taking a realserver offline
horms at verge.net.au
Mon Oct 4 04:49:47 BST 2004
On Sat, Oct 02, 2004 at 08:32:52AM +0100, Malcolm Turnbull wrote:
> A brutal disconnect is the usual way to go, ldirectord handles it
> cleanly I assume keepaliced does as well.
> In ldirectord quiescent should be set to zero.
I am not sure about keepalived, but fundamentaly LVS offers two ways to
take a real-server offline. The first is to remove the real-server from
the virtual service. This means that all connections to the real server
in question will be terminated, all persistance templates will be
invalidated, and no new connections can be made to the real server.
This is the quiescent=no behaviour that ldirectord offers.
The other way is to set the weight of the real-server to 0. Existing
connections will continue to function. New connections will not be
accepted. This is the quiescent=yes behaviour that ldirectord offers.
There is a caveat to using this 0 weight technique, which is that
persistance templates are left in place. This means that if an end-user
has recently made a connection to a persistant service, and the
persistance timeout has not elapsed, then the new connection is not
accepted. This is unfortunately probably not the behaviour you want.
I have a patch that adds the expire_quiescent_template proc entry for
LVS, which when activated will expire persistance templates when the
real server is quiescent (has a 0 weight). In a nutshell if you turn
this on and set a real server's weight to 0 then existing connections
will continue, and new ones will be directed to another real server,
regardless of weather the service is persistant or not.
The patch can be found in the mailing list archive
Though I don't think that Wensong has pushed it into the kernel.
More information about the lvs-users