Re: Question about source IP persistence (balance source) when a server goes down:

From: Willy Tarreau <w#1wt.eu>
Date: Sat, 17 Jan 2009 22:36:24 +0100


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 Received on 2009/01/17 22:36

This archive was generated by hypermail 2.2.0 : 2009/01/17 22:45 CET