nginx, echo module & lua
agentzh at gmail.com
Thu May 3 12:52:55 UTC 2012
On Thu, May 3, 2012 at 3:53 PM, Antonio P.P. Almeida <appa at perusio.net> wrote:
> A little thread hijacking. Are there plans to provide an HTTP response
> parser? I suppose that for performance reasons that would have to
> be in C along the lines of the Redis parser.
> That's what's missing, IMHO, in order to completely replace
Liseen Wan has been working on the lua-resty-http library:
We'll extend that to support more and more HTTP features in the near future.
But I think it will remain pure Lua because introducing C may not
really help here given the performance of LuaJIT 2.0 (and it has
already been proven in lua-resty-mysql where rewriting the MySQL
packet parser in C actually slowed things down because going across
language boundary is more expensive).
But anyway we can provide pure C API for ngx_lua cosocket, just like
ngx_http_upstream, so a pure C implementation for those lua-resty-*
library will have a chance to achieve better performance than the pure
Lua implementations, but I'm not 100% sure ;)
More information about the nginx