balance more fair when there are several servers with equal weights,

side effect: now smallest weights go first
This commit is contained in:
Igor Sysoev 2007-09-09 18:23:21 +00:00
parent 589fc748ed
commit fcd9dda633

View File

@ -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;
}