Lua/Redis Routing with Failover

agentzh agentzh at
Thu Feb 2 04:19:59 UTC 2012

On Thu, Feb 2, 2012 at 12:05 AM, Rick Richardson
<rick.richardson at> wrote:
> Sorry for the confusion. I don't want failover/backup for redis servers, I
> want the redis request to return multiple upstreams that I can proxy to with
> proxy_pass.
> E.g. I get a request for I ask redis for a list of upstream servers
> to which I can serve  I then feed the entire list somehow into
> proxy_pass.  It then performs its normal htttp_upstream operation as if it
> had a standard list of peers in an upstream.

Sorry for the misunderstanding :)

I think we could just patch ngx_proxy and mimic
ngx_http_upstream_create_round_robin_peer to dynamically construct a
peer list for the current request, just like how ngx_proxy does now
for multiple A records corresponding to a single host name if the
dynamic resolver is used. You can have a try ;)

Maybe it makes sense to provide a generic interface for ngx_proxy to
make such things easy.

Best regards,

More information about the nginx-devel mailing list