Lua/Redis Routing with Failover
agentzh
agentzh at gmail.com
Wed Feb 1 04:25:06 UTC 2012
On Wed, Feb 1, 2012 at 11:27 AM, Rick Richardson
<rick.richardson at gmail.com>wrote:
> I have a requirement to route dynamically by domain to a set of all
> participating peers similar to the Dynamic Request Routing Based on
> Redis in Open Resty, the difference is that if one upstream peer is
> down, I'd like to fail over to the next one. So Redis would return a
> priority-sorted list of upstream peers for any given domain instead of
> 1.
>
>
Well, just put multiple (redis) servers into every upstream config block,
like this:
upstream A {
server foo.com:6379;
server bar.com:6379 backup;
}
Then bar.com:6379 will be a backup node for foo.com:6379 when
foo.com:6379is down.
Best regards,
-agentzh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120201/cff3ed76/attachment-0001.html>
More information about the nginx-devel
mailing list