LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] help! lvs works as it should (timeouts)

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] help! lvs works as it should (timeouts)
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Thu, 19 Jul 2007 10:00:51 +0100
On Wed, 2007-07-18 at 15:36 +0100, lists wrote:
> The windows RDP client sends 1 keepalive per minute if it is maximised, 
> and sometimes wont send any if it is minimised.
> As far as I'm aware the default LVS time out is 15 mins.

[root@ernie ~]# ipvsadm -L -n --timeout
Timeout (tcp tcpfin udp): 900 120 300

Those are the defaults. Tune as you will :)

> And also useful:
> 
> With a protocol with a long session & persistence enabled such as 
> Terminal Server RDP
> maintenance can become problematic because clients that disconnect and 
> re­connect will still go to
> the same server for the length of the persistence time out. You can 
> change this behaviour so that
> when a client disconnects the persistence template is cleared forcing 
> them to re­connect to a
> different server.
> 
> This is activated globally by using the following command from the console:
> 
> echo 1 > /proc/sys/net/ipv4/vs/expire_quiescent_template

That's not strictly true - that sysctl ensures that when a realserver's
weight is changed to 0 (ie. it is set to "quiescent"), rather than
removed from the pool of realservers, existing persistent sessions on
that realserver are expired from the persistence template.

Where you have persistence set on a virtual service, setting the weight
to 0 usually results in no new sessions being forwarded to that
realserver *but* existing sessions will continue to be handled until
they are closed. It's the "graceful" way of taking a server down for
maintenance, for example.
If you remove a realserver from the pool, with expire_quiescent_template
set to 1, those sessions expire immediately.

Additionally, setting expire_nodest_conn to 1 also helps by removing
persistent entries when a realserver is removed from the pool. Without
this, persistent entries will hang until they timeout and get redirected
to another realserver.

Graeme


_______________________________________________
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
<Prev in Thread] Current Thread [Next in Thread>