Load balancer question

mex nginx-forum at nginx.us
Wed Nov 12 08:00:14 UTC 2014


Hi, 

> I would like nginx to manage the requests among the three instances above,
depending on the load. Is it correctly defined? 

what you have defined is a round-robin-based loadbalancing,
what you probably would like to do is a loadbalancing based on the
connections processed:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_conn

"Specifies that a group should use a load balancing method where a request
is passed to the server with the least number of active connections, taking
into account weights of servers. If there are several such servers, they are
tried in turn using a weighted round-robin balancing method."

please read http://nginx.org/en/docs/http/ngx_http_upstream_module.html
for more available loadbalancing-methods

> How can I test that my request are properly managed by nginx?

create a dummypage on each server and / or check the logs on your appserver.



cheers, 


mex

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,254770,254781#msg-254781



More information about the nginx mailing list