I'm actually on the verge of releasing a new huge update. New features include:
* first class lua support
* built in support for a lua templating language: https://github.com/leafo/etlua
* a new postgres driver written in pure lua, should play nicer with luajit and and be available in more stages of nginx request cycle: https://github.com/leafo/pgmoon
* lots of other smaller changes
All of this code is in master I just need to write all the documentation for it, sigh.
The biggest site I've created with lapis is itch.io: http://itch.io it's currently 43,209 lines of code (excluding libraries).
I run it on a really crappy 10 dollar a month vps, memory and cpu usage is tiny. I've handled well over a million requests per day in the past with no issues. The app communicates with a lot of third party payment services over http in the server, because of the non-blocking nature of openresty throughput is not affected when these services are slow (eg. paypal).
Another interesting lapis project is MoonRocks: http://rocks.moonscript.org/ it's a public lua module hosting site. It's opensource so you can check out what a developed lapis application looks like: https://github.com/leafo/moonrocks-site
Thanks for checking out lapis!
Is there something out there that I'm not aware of? The following comment by the creator of openresty seems to indicate that there is not:
https://groups.google.com/forum/#!topic/openresty-en/VSIM8jY...
For lapis I did build a server side console for running code in the same environment as the worker though, it might be useful: http://leafo.net/lapis/reference.html#lapis-console
This project looks interesting, maybe it can be used: http://keplerproject.org/remdebug/
It's an early work, but you can set breakpoints, step through the code, run ngx commands remotely, inspect stack/variables, and do all the things you'd expect from an interactive debugger. I included a screenshot in the blog post.
I'm interested in getting it to work with moonscript/lapis as well, but ran into issues with mapping source code information between moonscript and lua from the debugger.
After a topic here in HN saying about doing auth in lua+nginx, we successfully migrated our auth from inside the applications (all java) and now it's a 100 LOC of Lua, easy and decoupled from the application.
For anyone curious about the potential issues there is a good article about the flaws in JavaScript's handling of Unicode at http://mathiasbynens.be/notes/javascript-unicode#accounting-.... HN discussion: https://news.ycombinator.com/item?id=7221362.
http://lua-users.org/lists/lua-l/2006-01/threads.html#00650, cf. thread "coroutine.clone and stateful web applications".
(Coroutines are essentially one-shot continuations; if you can clone them, you can bookmark execution states at will. Look at Lua's upvalue semantics to anticipate what will happen to variables shared by multiple coroutine clones).
The author of Lapis is also very responsive to PRs and bug reports.
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.
That said, performance is totally on the side of lapis/openresty. The performance of my side project totally depends on how fast postgres responds to the needed queries.
(1) think caching, auth/acl, security filters, some of the stats, some of the logs, etc
https://github.com/torhve/lapis-docker
it includes a readme for getting started with Openresty in general.
This might help: http://www.techempower.com/benchmarks/
> Does it make sense to stuck everything into a (used to be ) reverse proxy server ?
Just like putting stuff into Apache or whatever other webserver you like.
http://www.techempower.com/benchmarks/#section=data-r9&hw=i7...