Hello!
On Wed, Jan 30, 2013 at 5:47 AM, Onur Bozkurt wrote:
> Is there particular reason that echo directive runs much slower than
> content_by_lua "ngx.say('foo')"; directive?
> Using Lua for echoing works almost 3x faster than Echo module. I'm using
> OpenResty 1.2.6.1 on Debian.
>
How did you test it? If you're using ab -k to test it, then it's just
that ngx_lua supports HTTP 1.0 keepalive out of the box (unless you
turn off lua_http10_buffering) while ngx_echo does not.
See the documentation for details:
http://wiki.nginx.org/HttpLuaModule#lua_http10_buffering
BTW, I'm cc'ing the openresty-en mailing list:
https://groups.google.com/group/openresty-en And you're very welcome
to discuss such issues on that list. Thank you for your cooperation :)
Best regards,
-agentzh