LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: about the timeout in IPVS persistence

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: about the timeout in IPVS persistence
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 14 Jul 2004 15:00:53 +0900
On Wed, Jul 14, 2004 at 01:52:43PM +0800, Ye Xiaowei wrote:
>   Hi,
> 
>       I have done some  tests about IPVS persistence.Here is my command lines:
> 
>        -A -t 192.168.0.254:0 -s rr -p 10
>        -a -t 192.168.0.254:0 -r netmatrix:http -g -w 1
>        -a -t 192.168.0.254:0 -r realserver2:http -g -w 1
> 
>     In my opinion:
> When a client sends a tcp request to director,the director will keep this 
> connection for 10 seconds.And if there is no other tcp requests from the 
> client in 10 seconds,the persistence will be over and then another request 
> from it will be scheduled to other realserver(rr method).

That is correct.

>     But the test I just did shows that after 10 seconds (within this time 
> periond  no requests from that client) ,requests from that client is still 
> scheduled to the same realserver.
>     Why?

Perhaps the scheduler just ends up choosing the same server. I notice
you are using rr, which in your case means every second connection will
go to the first server, and every other conection to the second server.

Try looking at the connection table, ipvsadm -Lcn.

You can see the connection entries, they are the one with a zero source port.

http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.persistent_connection.html#port_0

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