could someone explain weights in upstream? thanks!

Gena Makhomed gmm at csdoc.com
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.

========================================================================

http://wiki.nginx.org/NginxHttpUpstreamModule

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

upstream backend {
  server backend1.example.com weight=5;
  server 127.0.0.1:8080       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 backend1.example.com
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,
 Gena






More information about the nginx mailing list