I've used openresty compiled with LuaJIT (nginx+LuaJIT) for some low latency high scale services in the past. I wonder would this make it so I could ditch nginx and go pure LuaJIT and still have that level of performance? Has anyone done performance testing of this against Nginx+LuaJIT (openresty)?
While I agree it'd be interesting to see how libuv event loop performs against the nginx event loop, keep in mind that if you're deploying a web application, nginx has a ton of other uses. For example if you need SSL termination, caching, static files served, url rewriting, rate limiting, etc., you're better off having nginx handle those then re-implementing all of that yourself. Also, unless you harden your HTTP server, you'll likely need to proxy it behind nginx anyway (as is the case with, say, tornado).
It seems to me the argument for OpenResty is: if you already have nginx in your stack, you might as well run your app in it as well.
(not saying a libuv based server in lua is pointless, I mean I've used tornado behind nginx. I also concede it would be super useful for non-web servers (say, a custom protocol/IMAP/DNS/etc.))
I've implemented pure LuaJIT servers (without libuv) which compare favorably to nginx in terms of latency and performance. But you should consider whether or not you will need SSL\HTTPS support. libuv is only an IO loop and will not provide this out of the box like nginx. Encryption is important and non-trivial. Most of the projects I've seen end up back at C and embedded Lua\LuaJIT (similar to OpenResty) rather than writing bindings and tests for SSL in the LuaJIT FFI because of this.
This would get toasted by Nginx right now. I'm on step 2 of "make it work, make it right, make it fast." There's a lot of low hanging fruit, like string concatenation, small mallocs, etc.
I started out working with OpenResty, and it still makes the most sense for a project that leans heavily on the functionality of Nginx.