Re: [lvs-users] different algorithms and persistence

To: " users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] different algorithms and persistence
From: Nikolaj <lorddoskias@xxxxxxxxx>
Date: Fri, 26 Oct 2007 11:54:39 +0300
Joseph Mack NA3T wrote:
> On Fri, 26 Oct 2007, Nikolaj wrote:
>> When one requests a resource using one of the two algorithms it will get
>> routed to some of the real servers.
> one of the realservers
> ^^^
>> And what will happen to any
>> subsequent TCP packets belonging to the same connection?
> will go to the same realserver (you can't break a tcpip 
> connection)
Basically when a connection is established LVS creates some sort of a 
connection table and looks it up to see if there is a connection with 
the parameters in the TCP packet (sequence number, dest ip address) etc. 
right and after a certain amount of time this info expires?

>> Now about the source hashing and destination hashing. Source hashing
>> refers to which source ip?
> source of the packet coming from the internet
If I'm right about the hashing as I said above, what's the difference 
with source hashing? For example if a given ip has already made a 
connection to one service and made another connection to a different 
service but with the same source ip address the second connection will 
be redirected to the same real server as the first one, won't it?

>> The client's? And the destination? Isn't the
>> destination ip always the same - the virtual ip?
> I forget what DH balances on. I thought I wrote it up in the 
>> I think more distinct and precise information should be entered in the
>> LVS howto. Also a separate section covering the scheduling algo will be
>> a good addition to  the howto.
Excerpt from the howto
"The -dh (destination hash) algorythm makes a hash from the target IP 
and all requests to that IP will be sent to the same realserver. This 
means that content from a URL will not be retrieved multiple times from 
the remote server. The realservers (eg squids in this case) will each be 
retreiving content from different URLs."

But the client doesn't know what are the real ips of the real servers 
how can they be cached (the ip addresses)? Or maybe LVS hashes the 
destination ip after it receives the packets and decides to witch real 
server to send it?

> It would be a wonderful contribution. Would you be prepared 
> to write it up?
I'm ready to write it, as soon as I'm confident with the differences 
between the different scheduling algorithms and the pros and cons.

> Thanks
> Joe

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