LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: LVS scheduling and persistent connections

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: LVS scheduling and persistent connections
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Sun, 20 Jul 2003 17:33:44 +0800 (CST)

On Mon, 14 Jul 2003, Anthony Brock wrote:

> We have an LVS server up and functioning as a front-end to 2 servers.
> However, I have a question concerning the use of algorithms in
> combination with persistence.
> 
> According to the website "Virtual Server Scheduling Algorithms"
> documentation each new connection with round-robin scheduling is
> directed to the next server. So far, this has worked quite well.
> However, I would like to move towards something like the
> "Least-Connection Scheduling" algorithm. How does this algorithm act
> when used with persistent connections?
> 

Well, persistent connection is used to guarantee that connections from 
the same client (IP address) will be sent to the same server before a 
persistent connection timeout. 

> In other words, if I have 6 people connect to the lc LVS (resulting in 2
> connections on servers a, b and c), the next connection will likely be
> directed to server a. However, if one of the connections is first
> terminated (say, to server b), then the next connection (with lc
> scheduling) would likely be directed to server b (as a replacement for
> the dropped connection).
> 
> However, would this behavior change if the disconnected client still has
> a persistent connection to server b? Would the new connection be treated
> as a 7th connection (rather than a 6th) or would it continue to be
> treated as a 6th connection (as it would without persistence)? Or do I
> have an incorrect view of how this algorithm functions?
> 

If there is still a persistent connection for a new request, then the 
connection will be sent to the server recorded in the persistent 
connection directly, it will not participate the LC scheduling.

Regards,

Wensong

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