LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

IPVS-persistance, weight and bringing down a realserver.

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: IPVS-persistance, weight and bringing down a realserver.
From: Olle Ö?stlund <olle@xxxxxxxxxxx>
Date: Fri, 16 Feb 2007 11:06:36 +0100
Hi

We are running a LVS-cluster with four realservers, serving a number of
Java-servlet-based websites using Tomcat (i.e HTTP/HTTPS-traffic only).
Our LVS is using LVS/NAT and the director's dispatching-algoritm is wrr
(weighted-round-robin).

Our HTTP-traffic is using HTTP-sessions, and we have tried to setup our
LVS-cluster to be "HTTP-session safe". We don't want client-sessions to
break when we shut-down the HTTP-service of a realserve.

Or first attempt of being "session-safe" was a setup where IPVS was
non-persistent and the Tomcat-servers was exchanging session-data via
Tomcat's session-replication mechanism. This worked fine, except when
booting up a Tomcat-server which could take forever (20 minutes or
more).

Currently, we are running a different setup, with no Tomcat
session-replication and IPVS-persistance ("server-affinity") set (600
seconds). This seems to work fine for all pratical-purposes, except for
one thing. Having IPVS-persistance set we find it difficult to bring
down a realserver in a nice controlled way.  

Our method of bringing down a realserver is letting the realserver stop
sending the "receive"-response to the directors "request"s (it sends
another response). This will result in the director setting the
realserver's weight to 0. When IPVS-persistance is not used the result
is that the number of ActiveConnections quickly decreases for the
realserver, and after a minute or two it is 0. 
However, when IPVS-persistance is set the number of active connections
does not decrease monotonically. Even after 20 minutes the number of
ActiveConnection may increase. It seems that "persistance" has "higher
precedence" then the IPVS weigt attribute.

To me it seems very strange that the direcor try to keep using a
realserver which weight is 0 / has stopped ansvering the directors
polling-requests. 

Could someone comment on this please?







<Prev in Thread] Current Thread [Next in Thread>