Different application area but we implemented Lua into a MUD (online RPG) as the scripting interface for all area builder development and it was probably the single most valuable change we ever made. Check out the 'lua coding' section on Aardwolf.com if you want to see some examples. Over 200,000 lines of lua now, millions of prog executions per hour and still as fast as ever.
Can you provide us with an idea of how much this improved performance or how many more requests it allowed you to handle? Were there time or cost savings compared to alternative approaches?
Is there any reason in principle why this has to be done with Lua and not with other interpreted languages?<p>Once you are writing interpreted code which reads request data and interacts with Redis you are not that far from what a normal Ruby or Python web app does anyway.
There is an introductory talk (video and slides) from the London Lua meetup group on Nginx and Lua here <a href="http://www.londonlua.org/scripting_nginx_with_lua/index.html" rel="nofollow">http://www.londonlua.org/scripting_nginx_with_lua/index.html</a>
So the idea is interesting, but I think adding something like this onto Nginx could lead to problems in the future.<p>For what you're trying to do, I feel like implementing your reverse proxy in Go may prove to be less prone to errors. Go has ReverseProxy stuff already built in: <a href="http://golang.org/pkg/net/http/httputil/#ReverseProxy" rel="nofollow">http://golang.org/pkg/net/http/httputil/#ReverseProxy</a><p>Go already has a pretty strong following doing near exactly what you are doing here with Nginx + Lua. But that would require learning a new language and screwing with infrastructure, which always is a giant pain.
Bit off topic but you might want to 301 redirect to the right page instead of just disallowing search engines on your subdomains. This way if someone links to the wrong page you will still get the link juice.<p>I might have misunderstood that first bit though, since it looks like you do redirect anyway.