[ANN] ngx_lua v0.1.5: ability to capture multiple parallel subrequests
agentzh at gmail.com
Thu Feb 10 13:36:05 MSK 2011
On Thu, Feb 10, 2011 at 6:26 PM, Alexander Kunz <akunz at ntmedia.de> wrote:
> Thanks for sharing so many of your Nginx addons, Nginx scripting is so
> exciting. I read
> your 2 slides about Nginx scripting. Very intersting, are there some more
> examples or informations
> about Nginx scripting?
Maybe my blog count? ;)
I do have the plan of writing a bunch of (detailed) tutorials on this this year.
> I try out your example, you subrequest on a redis location. I use the redis2
> addon, but i
> allways get in the first line the bytes for my redis request. Is there a
> solution hide this information?
The ngx_redis2 module returns the raw TCP response from the redis
server. It's recommended to use my lua-redis-parser module (written in
pure C) to parse these responses into lua data structure:
If you only want to use the "get" redis command, you can try out the
ngx_redis module here:
It returns the parsed content part of the redis response because only
"get" is needed to implement.
> So it would be possible to use redis2 for caching whole HTML pages.
Right, using ngx_srcache + ngx_lua + lua-redis-parser. See ngx_srcache
It's much like Apache2's mod_cache, but only support silly response
body caching (for now) and is 100% non-blocking. I're already using
ngx_srcache + ngx_memc to cache responses via memcached in production.
> Have a nice day agentzh!
Thanks! :) The same to you ;)
More information about the nginx