[lvs-users] Persistence Confusion

Jason Ledford jledford at biltmore.com
Sun Oct 7 20:23:21 BST 2012


We have been using lvs in several situations with great success.  One of the implementations is for Microsoft Terminal Services.  we are load balancing over a couple of servers.  we like for the users to return to the same server when possible because of applications running on the servers.  we have persistence set to 6 hours (I know, long time) and what I have just figured out is that the 6 hours starts on the initial connection and doesn't get reset unless they disconnect and reconnect.  so if a user connects and gets routed to a terminal server the clock starts, if they just sit and do work for the next 5 hours and 30 minutes, then disconnect leaving apps running, and then come back after 6 hours that timer has expired and they get routed to a different server (potentially), causing licensing issues with the apps they were running.

Looking at the connection table ipvsadm -Lc I see a line for the 6 hour timer and another line for the established connection and another fin_wait that I am not sure what its for.
TCP 359:41 NONE        lt1150cdc.domain.com:0 tbcsrv970.domain.com:3389 tbcsrv973.domain.com:3389
TCP 14:59  ESTABLISHED lt1150cdc.domain.com:53087 tbcsrv970.domain.com:3389 tbcsrv973.domain.com:3389
TCP 01:41  FIN_WAIT    lt1150cdc.domain.com:53086

As soon as I disconnect the established changes to a fin_wait.  So my question is, is it possible for the timer to start on a disconnect, or is there another approach I need to take so that the persistence is after an active connection?  here is my config:
#global options
checktimeout=20
checkinterval=4
autoreload=yes
quiescent=no
virtual = 10.72.5.4:3389
       protocol=tcp
       scheduler=wlc
       checkport=3389
       checktype=connect
       real=10.72.5.5:3389 gate 1
       real=10.72.5.6:3389 gate 1
       real=10.72.5.7:3389 gate 1
#       real=10.12.1.40:3389 gate 1
       persistent=21600
I might have babbled a little bit so if I can clear up my question or answer other questions please let me know.



More information about the lvs-users mailing list