]> git.kaiwu.me - nginx.git/commit
Upstream: fixed ip_hash rebalancing with the "down" flag.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 14 May 2012 09:58:07 +0000 (09:58 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 14 May 2012 09:58:07 +0000 (09:58 +0000)
commit4d5759e09841676dc745012f7e551e83e3b02fee
treec1d0fa0b482d8c5cfd91b4526e2152e17b95c30b
parent52327e0627f49dbda1e8db695e63a4b0af4448b1
Upstream: fixed ip_hash rebalancing with the "down" flag.

Due to weight being set to 0 for down peers, order of peers after sorting
wasn't the same as without the "down" flag (with down peers at the end),
resulting in client rebalancing for clients on other servers.  The only
rebalancing which should happen after adding "down" to a server is one
for clients on the server.

The problem was introduced in r1377 (which fixed endless loop by setting
weight to 0 for down servers).  The loop is no longer possible with new
smooth algorithm, so preserving original weight is safe.
src/http/ngx_http_upstream_round_robin.c