We use Django behind gunicorn for most of the stack. Not that Django is slow (we still happily use it for 99% of our public facing system) -- it's just that OpenResty is so fast[1].
Besides the fact that OpenResty is built on C/Lua, Nginx's evented architecture makes it scale concurrently really well. We use Gunicorn in a multiprocessing configuration for the rest of the stack -- so each worker consumes much more RAM than the equivalent evented configuration.
We were toying with the idea of implementing the service with Tornado (also evented, but in Python) -- but OpenResty/Lapis has been so great for our use case that it's tough to justify the test at this point.
Comments
What framework were you using before that required 5 medium ec2 instances? I'd really appreciate knowing what you were comparing Lapis to.
We use Django behind gunicorn for most of the stack. Not that Django is slow (we still happily use it for 99% of our public facing system) -- it's just that OpenResty is so fast[1].
Besides the fact that OpenResty is built on C/Lua, Nginx's evented architecture makes it scale concurrently really well. We use Gunicorn in a multiprocessing configuration for the rest of the stack -- so each worker consumes much more RAM than the equivalent evented configuration.
We were toying with the idea of implementing the service with Tornado (also evented, but in Python) -- but OpenResty/Lapis has been so great for our use case that it's tough to justify the test at this point.
[1] http://www.techempower.com/benchmarks/