LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: clearing persistent connections

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: clearing persistent connections
From: jos houtman <jos@xxxxxxxx>
Date: Tue, 29 Mar 2005 09:48:57 +0200
Horms wrote:

_WANTED SITUATION_
so what I want to do, is let mon put the weight to 0. and after a while clear the active persistent connections.
So that it is effectively out of the cluster.
if it comes back up, mon can put the weight back to 1.

But if i decide to maintain a server, i can take it out of the cluster (-d). and mon can try what it want to put the weight back to 1. but the server wont be there.
Won't mon only re-add it if it is there?
True True, But out checks are pretty general and in some situation do not detect that i want the server out of the cluster:
- can we serve webpages
- is database replication not lagging.

If for example I want to tune apache, and I start apache to test if it is working,
I dont want mon to re-add the server.

another advantage is that i can see which servers are not working in the cluster because there weight is 0.
Basically 0 is a magic weight that means the server is quiescent.
In the past I have thought about using a different magic weight (-1 ?)
to put a real-server into the same state it would be if it was deleted,
that is kill all exising connections and not accept any new ones.
This would do exactly what I want!
Are there plans to implement this?

Annother approach, as you suggest, is to just clear the connections.
Which... ... you could achive this by removing the real-server and re-adding
it with a 0 weight. But it might be nicer just to pass an
argument to ipvsadm (--clear, --kill-conn?) which just askes LVS
in the kernel to run through the active connections and close them.
I tried your suggestion and did the following:
#ipvsadm -d -t hyves.startpda.net:www -r vixen.internal
#ipvsadm -a -t hyves.startpda.net:www -r vixen.internal -g -w 0

This doesnt clear the connections.

I tried the --clear option, but this removes all entries from the table, including services and virtual servers.

There doesnt not seem to be a --kill-conn option.

#santa root # ipvsadm --version
#ipvsadm v1.24 2003/06/07 (compiled with popt and IPVS v1.2.0)



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