On Mon, May 10, 2010 at 08:33:35PM +0200, Tomasz Chmielewski wrote:
> Am 05.05.2010 10:51, Simon Horman wrote:
> >> Is there a workaround for that? I.e. if the realserver is gone, the
> >> connections for that client should start hitting the other realserver,
> >> even with persistence enabled.
> > Try setting /proc/sys/net/ipv4/vs/expire_quiescent_template to 1,
> > this can be done manually using echo or using the sysctl command.
> What's the difference between the above and setting "quiescent = no" in
> With "quiescent = no", /proc/sys/net/ipv4/vs/expire_quiescent_template
> is still 0.
Setting quiescent = no turns off quiescence.
Setting /proc/sys/net/ipv4/vs/expire_quiescent_template effects
how persistent templates are treated if a server is quiesced -
that is, it modifies the behaviour if quiescence is enabled.
To be more specific, if quiescent = no is set and a real-server becomes
unavailable then ldirectord simply removes it from the LVS configuration
table which prevents new connections being scheduled to the real-sever
in question and breaks any connections that receive packets while the
real server is off-line. This a simple in many cases
most appropriate way of handling a real-server going off-line.
Conversely if quiescent = yes is set and a real-server becomes unavailable
then ldirectord changes its weight to 0 in the LVS configuration table.
This generally prevents new connections from being scheduled while allowing
existing connections to continue working. The idea is that it can be useful
for taking real-servers gracefully off-line. In practice if the real-server
has crashed then connections can't continue and this setting only adds
One such complication is the handling of persistence. By default
if a real-server is quiesced then it can still have new connections
scheduled to it in the case where persistence is enabled and an
end-user associated with the real-server in question makes a fresh
connection. Internally this association is known as a persistent template.
Setting /proc/sys/net/ipv4/vs/expire_quiescent_template to a non-zero
value alters this behaviour such that the template is expired and
new connections aren't scheduled even if they ordinarily would have
been scheduled due to the association set up by persistence.
In my opinion would be more sensible for this to be the default, but
for historical reasons it isn't.
Please read the documentation before posting - it's available at:
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users