Hi Malcolm,

On Fri, Jan 16, 2009 at 02:48:18PM +0000, Malcolm Turnbull wrote:
> The manual states that when using balance source:
> 
> "The source IP address is hashed and divided by the total
> weight of the running servers to designate which server will
> receive the request. This ensures that the same client IP
> address will always reach the same server as long as no
> server goes down or up. If the hash result changes due to the
> number of running servers changing, many clients will be
> directed to a different server. This algorithm is generally
> used in TCP mode where no cookie may be inserted. It may also
> be used on the Internet to provide a best-effort stickyness
> to clients which refuse session cookies. This algorithm is
> static, which means that changing a server's weight on the
> fly will have no effect."
> 
> 
> Does this mean that if say 1 server out of a cluster of 5 servers
> fails, then it is likely
> that the hash result changes and lots of the clients could potentially
> loose their session? (i..e hit the wrong server because the hash has
> changed)

Absolutely. That's why hashing should only be used for cache
optimization but not when strong persistency is required in case
of server failure (cookies are far better then).

Regards,
Willy


Reply via email to