changeset 1465:a9132739bb57

balance more fair when there are several servers with equal weights, side effect: now smallest weights go first
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Sep 2007 18:23:21 +0000
parents 3263e4b17903
children 943f2ba615cd
files src/http/ngx_http_upstream_round_robin.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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_upst
                 }
 
                 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;
                 }