LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: How can I flush the connection table?

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: How can I flush the connection table?
From: Joseph Mack NA3T <jmack@xxxxxxxx>
Date: Tue, 13 Jun 2006 09:24:08 -0700 (PDT)
On Tue, 13 Jun 2006, Hildebrand, Nils, 122 wrote:

After some clients connected through lvs to Webserver #2 the Webserver #2 went down. Some seconds later lvs-kiss realized the servers was down and set the weight for that server to zero.

BUT: Clients were still trying to connect to Webserver #2.

After I looked at "ipvsadm -Lc" I found that their old connection was still
there and the timeout-value for Webserver#2 got reset to one hour againg
after every try.

I would have expected that all Webserver #2-connections will get invalidated
and that the client-retry would then go to Webserver #1.

What's wrong here?

you don't understand the contract you've made with the director by using persistence. By setting the weight to zero you told the director not to establish new connections to that realserver. The current connections will still be forwarded and will continue till an hour after their last connection. There not being easy ways of moving sessions/keys, you aren't allowed to have a realserver fail when you have a session. If you're using persistence to enforce your session, you have to shut down your realserver pre-emptively for service and guarantee it stays up when you put it back on line.

The alternate method is to have the session information global (eg in a database accessible to all realservers, or cookies at the client end). This requires rewriting your application.

If you really want to tear out the client's session, the HOWTO tells you HOW.

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml Homepage http://www.austintek.com/ It's GNU/Linux!

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