summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-09-09 18:23:21 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-09-09 18:23:21 +0000
commitfcd9dda6333ba5696c4b9b6656c09ae10d2faf35 (patch)
tree8e47c553b593453eae457effd212b99b05418c94
parent589fc748ed9f9f5bb03c87d7f33b6a270c7a820b (diff)
downloadnginx-fcd9dda6333ba5696c4b9b6656c09ae10d2faf35.tar.gz
nginx-fcd9dda6333ba5696c4b9b6656c09ae10d2faf35.tar.bz2
balance more fair when there are several servers with equal weights,
side effect: now smallest weights go first
-rw-r--r--src/http/ngx_http_upstream_round_robin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 4f017f922..d0911a04f 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -498,7 +498,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
}
if (peer[n].current_weight * 1000 / peer[i].current_weight
- >= peer[n].weight * 1000 / peer[i].weight)
+ > peer[n].weight * 1000 / peer[i].weight)
{
return n;
}