Welcome! Log In Create A New Profile

Advanced

Lua/Redis Routing with Failover

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

My plan is to build make an array of peer structs available to lua so
that my lua script can populate the array on each upstream.init. Then
a custom upstream->peers.get/free would set or reset the current
chosen peer.

I think that this would mean that I would have to have a custom upstream.

Is there an easier way?

_______________________________________________
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 1974 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 586 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 578 February 01, 2012 09:58PM

Re: Lua/Redis Routing with Failover

agentzh 507 February 01, 2012 11:22PM

Re: Lua/Redis Routing with Failover

rovar 720 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 921 February 02, 2012 07:40AM



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

Online Users

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