Welcome! Log In Create A New Profile

Advanced

Re: Lua/Redis Routing with Failover

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 1977 January 31, 2012 10:28PM

Re: Lua/Redis Routing with Failover

agentzh 567 January 31, 2012 11:26PM

Re: Lua/Redis Routing with Failover

rovar 587 February 01, 2012 11:06AM

Re: Lua/Redis Routing with Failover

rovar 537 February 01, 2012 12:04PM

Re: Lua/Redis Routing with Failover

Brian Akins 580 February 01, 2012 09:58PM

Re: Lua/Redis Routing with Failover

agentzh 509 February 01, 2012 11:22PM

Re: Lua/Redis Routing with Failover

rovar 721 February 01, 2012 11:42PM

Re: Lua/Redis Routing with Failover

agentzh 625 February 02, 2012 03:52AM

Re: Lua/Redis Routing with Failover

rovar 923 February 02, 2012 07:40AM



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

Online Users

Guests: 291
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