Hi,this is Ichiro.
When I used nginx as a load balancer, I want to set the connection limit
of an individual server.
ex)---------------------------------------------
upstream 192.168.1.1 {
server 192.168.11.1:80; ← 100 conn/sec
server 192.168.11.2:80; ← 100 conn/sec
}
total 200 conn/sec
It is not a connection limit of the entire VirtualServer[192.168.1.1],
and I want to set it to an individual server[192.168.11.[1,2]].
Is such a setting possible?
Would you teach this setting method?
Regards.
Posted at Nginx Forum:
Ichiro
2
Hi!
You need a third party module ( NGINX 3rd Party Modules | NGINX )
such as EY Balancer: http://github.com/ry/nginx-ey-balancer/tree/master
Posted at Nginx Forum:
Ichiro
3
Hello Ensiferous.
Thanks you!
I read explanation of EY Balancer, so understood that I just matched a
purpose.
I’m tring to install that soon!
Kind regards,
Ichiro
Posted at Nginx Forum:
Ichiro
4
Hi.
This is Ichiro.
I installed EY Balancer Module.
So I looked like to be finished this problem.
This problem seemed to be over.
However, a problem occurred one more…
The queue beyond max_connections is kept waiting forever.
I tuned up ”max_connections_module.c", but behavior does not change.
Can you throw away connection beyond the “max_connections” to
sorry_server?
ex)---------------------------------------------
*nginx.conf
upstream 192.168.1.1 {
server 192.168.11.1:80; <- 1 conn/sec
server 192.168.11.2:80; <- 1 conn/sec
max_connections 1
}
max_connections_module.c
if (conf == NULL) return NGX_CONF_ERROR;
max_connections_rr_index = 0;
conf->max_connections = 1;
conf->max_queue_length = 10; / default max queue length 10000 /
conf->queue_timeout = 10; / default queue timeout 10 seconds */
return conf;