From fcd9dda6333ba5696c4b9b6656c09ae10d2faf35 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 9 Sep 2007 18:23:21 +0000 Subject: balance more fair when there are several servers with equal weights, side effect: now smallest weights go first --- src/http/ngx_http_upstream_round_robin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit