mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 12:22:41 +08:00
balance more fair when there are several servers with equal weights,
side effect: now smallest weights go first
This commit is contained in:
parent
589fc748ed
commit
fcd9dda633
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user