2

I've got Keepalived configured with LVS to spread the load between four Nginx web servers (RR mode, no persistence connections). I was planning to enable SPDY however it seems that SPDY sets up a single TCP connection per host so when a web node is removed from the pool, client tries to send further requests down the original connection, but the load balancer can't move that existing connection on to a new server, so all web requests time out for that client.

Is there a way to force the load balancer to close all connections to a failed server or perhaps any other solution for this?

HTF
  • 3,050
  • 14
  • 49
  • 78
  • Did you try to setup `inhibit_on_failure` in each real server scope ? I believe by default existing connections of a server going down are blackholed. – Xavier Lucas Oct 21 '14 at 20:02
  • This option is already enabled in each real server. – HTF Oct 22 '14 at 06:18

1 Answers1

1

Try turning on persistence and then expire_quiescent_template

123 expire_quiescent_template - BOOLEAN
124     0 - disabled (default)
125     not 0 - enabled
126 
127     When set to a non-zero value, the load balancer will expire
128     persistent templates when the destination server is quiescent.
129     This may be useful, when a user makes a destination server
130     quiescent by setting its weight to 0 and it is desired that
131     subsequent otherwise persistent connections are sent to a
132     different destination server.  By default new persistent
133     connections are allowed to quiescent destination servers.
134 
135     If this feature is enabled, the load balancer will expire the
136     persistence template if it is to be used to schedule a new
137     connection and the destination server is quiescent.

http://www.mjmwired.net/kernel/Documentation/networking/ipvs-sysctl.txt

dmourati
  • 24,720
  • 2
  • 40
  • 69