LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: WWW Flow control with LVS (2)

To: Jean-Francois Nadeau <jna@xxxxxxxxxxxx>
Subject: Re: WWW Flow control with LVS (2)
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Wed, 29 Dec 1999 23:32:08 +0800
Jean-Francois Nadeau wrote:
> 
> Hi !
> 
> I want to create a cluster of 2 Apache web servers.  What I need is a way to
> send 100 % of the load on the first real server and switch the exedent
> requests locally.
> 
> Ex : Server1 (172.17.20.151) gets 100 % of the load until it reaches 400
> connections.  The next requests would go locally on 127.0.0.1.
> 
> ipvsadm -C
> ipvsadm -A -t 172.17.20.161:0 -s rr -p 300
> ipvsadm -a -t 172.17.20.161:0 -r 127.0.0.1:0 -w 0
> ipvsadm -a -t 172.17.20.161:0 -r 172.16.20.151:0 -w 100
> 
> ipvsadm -l
> IP Virtual Server version 0.9.5 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
> TCP  172.17.20.161:(null) rr persistent 300
>   -> localhost:(null)            Local   00      0          0
>   -> 172.17.20.160:(null)        Route   100     0          0
> 
> I could rewrite:
> ipvsadm -e -t 172.17.20.161:0 -r 127.0.0.1:0 -w 100
> ipvsadm -e -t 172.17.20.161:0 -r :0 -w 0
> 
> when I see 400 ActiveConn using a script...
> 
> But I dont want the request on 127.0.0.1 to be persistent !
> 
> Any idea on how to do this ?
> 

I don't understand why you want to set requests to 172.17.20.160
persistent and not to set request to localhost persistent. It doesn't
hurt when you leave the virtual server persistent. :-) After your real
server recovers from the overloaded state, you can set "ipvsadm -e -t
172.17.20.161:0 -r localhost -w 0" and "ipvsadm -e -t 172.17.20.161:0
-r 172.17.20.160 -w 100". After all the persistent connections to the
localhost expires, all new connections go to your real server.

Anyway, if you don't want your service persistent, just simple do
"ipvsadm -E -t 172.17.20.161:0 -s rr"

Wensong


> Can I desactivate the persitent connections on 127.0.0.1 ?
> 
> Any better way of doing this ?
> 
> Where in the code should I look to create my own sets of scheduling algo ?
> 
> Thanks in advance.
> Jean-Francois Nadeau
> 
> ----------------------------------------------------------------------
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx

----------------------------------------------------------------------
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx

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