weight and balancing in upstream proxy
al-nginx at none.at
Fri Apr 14 08:47:27 UTC 2017
Am 12-04-2017 23:50, schrieb Frank Liu:
> How does nginx balances traffic to upstream with different weight?
> If I have 3 servers in upstream, with weight 1, 2, 4, assuming all are
> healthy, will nginx send traffic to server 1, 2, 3, 2, 3, 3, 3 or 1, 2,
> 2, 3, 3, 3, 3?
> If I have two servers with both weight 50, will nginx will 50 requests
> to server 1, and then 50 to server 2, or will it calculate the ration
> to be 1:1 and send one after another?
You can find a explanation of the algorithm in the commit messages.
I have found this with this query.
Have you seen this doc?
More information about the nginx