could someone explain weights in upstream? thanks!

Gena Makhomed gmm at
Sun Sep 13 20:57:02 MSD 2009

On Sunday, September 13, 2009 at 19:26:48, Ilan Berkner wrote:

IB> Does a higher weight mean higher priority or the other way around?

answer to this, and many other questions, - you can find in wiki.


Requests are distributed according to the servers
in round-robin manner with respect of the server weight.

upstream backend {
  server weight=5;
  server       max_fails=3  fail_timeout=30s;
  server unix:/tmp/backend3;

For example of every 7 seven requests given above
they will be distributed like this: 5 requests on
and one request to the second and the third of server.

If with an attempt at the work with the server error occurred,
then the request will be transmitted to the following server
and then until all workers of server not are tested.

If successful answer is not succeeded in obtaining from all servers,
then to client will be returned the result of work with the last server.


Best regards,

More information about the nginx mailing list