Hello!
On Thu, May 21, 2015 at 6:39 PM, MELWIN JOSE wrote:
> I have a requirement of having a nginx server that receives HTTP request and
> sends back response from redis store, and this should be non-blocking. After
> googling and going through forums, i cam across the nginx_redis2_module, but
> i was not able to understand its working.
Please walk through the documentation of this module, especially the
configuraton samples there. Let us know if you have any concrete
questions:
https://github.com/openresty/redis2-nginx-module#readme
BTW, it's recommended to use the lua-resty-redis library with the
ngx_lua module nowadays BTW:
https://github.com/openresty/lua-resty-redis#readme
> How have they achieved
> non-blocking operation?
The implementation details are not different from the standard nginx
upstream modules like ngx_memcached, ngx_proxy, and ngx_fastcgi.
If you're interested in the implementation details, try reading the
code. Also, ensure you have the Evan Miller's nginx module development
guide.
> Is it by adding events to nginx's event loop ?
Yes, sure.
> Is
> there any document or sample code how it is done ?
>
See above :)
Best regards,
-agentzh