LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

AW: How can I flush the connection table?

To: "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: AW: How can I flush the connection table?
From: "Hildebrand, Nils, 122" <Nils.Hildebrand@xxxxxxxxxxxx>
Date: Fri, 16 Jun 2006 14:46:48 +0200
Hi Ken,

thanks for that hint!

With lvs-kiss the solution is pretty easy - so even lady luck worked in
favour ;-)

Within each real-server-definition there are some optional directives.
So the two needed directives are:

  RunOnFailure "/sbin/ipvsadm -d -t SIP:80 -r RIP"  (for both real servers)
  RunOnRecovery "/sbin/ipvsadm -a -t SIP:80 -r RIP" (same)

This does what is needed:

After realizing that a server is down it sets its weight to zero and then
issues that command resp. when it is "up" again vice versa.


Kind regards, Nils

P.S.
Sorry - this e-mail-client destroys thread-information...

> -----Ursprüngliche Nachricht-----
> Von: Ken Brownfield [mailto:krb@xxxxxxxxxxx] 
> Gesendet: Dienstag, 13. Juni 2006 18:03
> An: LinuxVirtualServer.org users mailing list.
> Betreff: Re: How can I flush the connection table?
> 
> In my experience, I've had to remove the real server entirely 
> when I have persistence active.  Unless of course you're 
> willing to wait an hour :).  But I also have had new 
> connections continue to trickle in to a zero-weight real 
> server in the absence of persistence, so I think there's also 
> a general issue where a zero weight isn't literally zero.
> 
> I remove real servers within health monitoring in the general 
> case, as opposed to zero-weighting them.  If zero worked as 
> expected, that slightly drastic measure (hard connection 
> interruptions, orphans) wouldn't be necessary.
> 
> Good luck,
> --
> Ken.
> 
> 
> On Jun 13, 2006, at 6:13 AM, Hildebrand, Nils, 122 wrote:
> 
> > Hi,
> >
> > I subscribed to the mailing list, because I had a major problem  
> > with ipvsadm
> > today.
> >
> > I am using ipvsadm v1.24 on a SuSE 9.3 professional (Kernel
> > 2.6.11.4-21.11-smp).
> >
> > For configuring lvs I use lvs-kiss.
> >
> > I am doing a load-balancing for two webservers.
> >
> > Now the problem:
> > The service is configured with a persistency of one hour.
> >
> > After some clients connected through lvs to Webserver #2 the  
> > Webserver #2
> > went down.
> > Some seconds later lvs-kiss realized the server is down and sets  
> > 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  
> > again
> > 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? [...]

<Prev in Thread] Current Thread [Next in Thread>
  • AW: How can I flush the connection table?, Hildebrand, Nils, 122 <=