February 01, 2012 12:04PM
So in my conf I would have:

upstream myroutes {
lua_redis_route;
keepalive;
}

location / {
access_by_lua '
Fetch a list of peers with failover info from redis and then populate
the lua_redis_route upstream peer array with that data
'
}

The idea is simply that I would fetch a current list of peers from redis
and plug them in to nginx's existing upstream. This would allow me to
elegantly handle failure by failing over to the next peer on the list and
then report that peer as 'down' back to redis.
On Feb 1, 2012 11:05 AM, "Rick Richardson" <rick.richardson@gmail.com>
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 Foo.com. I ask redis for a list of upstream
> servers to which I can serve Foo.com. 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.
> On Jan 31, 2012 11:25 PM, "agentzh" <agentzh@gmail.com> wrote:
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Lua/Redis Routing with Failover

rovar 1981 January 31, 2012 10:28PM

Re: Lua/Redis Routing with Failover

agentzh 572 January 31, 2012 11:26PM

Re: Lua/Redis Routing with Failover

rovar 592 February 01, 2012 11:06AM

Re: Lua/Redis Routing with Failover

rovar 541 February 01, 2012 12:04PM

Re: Lua/Redis Routing with Failover

Brian Akins 585 February 01, 2012 09:58PM

Re: Lua/Redis Routing with Failover

agentzh 515 February 01, 2012 11:22PM

Re: Lua/Redis Routing with Failover

rovar 727 February 01, 2012 11:42PM

Re: Lua/Redis Routing with Failover

agentzh 630 February 02, 2012 03:52AM

Re: Lua/Redis Routing with Failover

rovar 927 February 02, 2012 07:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 188
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready