Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After a bit of testing I am starting some more serious Nginx+Lua development.

The big advantage is that it is a pretty mature http stack that is tested in production at scale, unlike some of the newer frameworks (that you probably run behind nginx anyway). It still has some limitations like the proxy module only supports http 1.0 and some of the chunked encoding stuff is partial at this point, but it is generally sufficient.

Luajit is really fast and nice to use (the ffi interface can call C directly) and coroutines mean that blocking calls can just drop back to the event loop. You have to write anything blocking as an nginx module though, hence this collection of modules as a bundle.

Having a real programming language in the context of a web server is nice, you can either do small things like write complex auth that you might otherwise have a proxy for, or you can write full content handlers.

Agentzh is pretty helpful on the nginx list with issues too.



I'm confused - there are some Perl modules and some LuaJIT modules. Is it Lua you will be programming if you use this?

Also, if you're interested in that combination, have you seen Zed Shaw's Tir? (http://sheddingbikes.com/posts/1289384533.html) Its Lua+ZeroMQ+Mongrel2.


Perl is just the the built process of the bundle. Lua is the programming language inside Nginx.

Tir looks nice too. It is more targeted at websocket type applications, although it is general purpose too. Nginx supports more traditional HTTP models, I dont know of any native websocket support for it, but you can of course use it to proxy to mongrel/node or whatever. Nginx has the maturity advantage, and you can use it as a proxy, load balancer, and so on. With the Lua support and these additional modules that taobao developed you get a full environment all in one place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: