weight and balancing in upstream proxy

B.R. reallfqq-nginx at yahoo.fr
Fri Apr 14 07:13:47 UTC 2017


Please, enlighten us then.
---
*B. R.*

On Thu, Apr 13, 2017 at 4:34 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Thu, Apr 13, 2017 at 10:09:16AM +0200, B.R. via nginx wrote:
>
> > That is an interesting questions as intuitively, people could think the
> > former behavior applies.
> >
> > If I got the source code
> > <https://trac.nginx.org/nginx/browser/nginx/src/http/ngx_
> http_upstream_round_robin.c#L507>
> > right, and as the docs
> > <https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream>
> > state, nginx is following a weighted round-robin
> > <https://en.wikipedia.org/wiki/Weighted_round_robin> algorithm.
> > It thus means it will go over the same list of servers everytime a peer
> > needs to be chosen (ie for every request), and pick the first not having
> > depleted its weight allocation.
> >
> > To me, it would use the latter of your proposals.
> > ​Please correct me if I am wrong, so incorrect information does not
> > propagate too much. :o)​
>
> The Wikipedia link in question doesn't seem to be related to what
> nginx does.
>
> --
> Maxim Dounin
> http://nginx.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170414/5b6e7ef7/attachment-0001.html>


More information about the nginx mailing list