Merge "haproxy global maxconn is less than default maxconn"

This commit is contained in:
Jenkins 2014-10-06 14:05:40 +00:00 committed by Gerrit Code Review
commit 2aa90bee9c
2 changed files with 11 additions and 3 deletions

View File

@ -13,6 +13,12 @@ The following properties are supported for configuring haproxy
* haproxy.stats.disabled: Set to true to disable the stats service
* haproxy.stats.port: Port for the stats service. Defaults to 1993.
* haproxy.stats.uri: URI for the stats service. Defaults to /.
* haproxy.global_maxconn: A limit on the total number of concurrent connections
that will be handled by a haproxy instance. haproxy will stop accepting
connections above this limit.
* haproxy.service_maxconn: A limit on the number of the number of concurrent
connections that are allowed to each proxied service. This is a default value
that can be overridden in an individual haproxy.service section.
Each haproxy.services can define the following sub-properties
@ -31,6 +37,8 @@ Each haproxy.services can define the following sub-properties
* proxy_ip: *DEPRECATED* IP address for a service to bind to. Defaults to all
IP's (0.0.0.0).
* proxy_port: *DEPRECATED* Port for a service to bind to.
* service_maxconn: A limit on the number of concurrent connections allowed to
this service.
Each haproxy.nodes can define the following sub-properties

View File

@ -2,13 +2,13 @@ global
chroot /var/lib/haproxy
daemon
group haproxy
maxconn 4000
maxconn {{#haproxy.global_maxconn}}{{.}}{{/haproxy.global_maxconn}}{{^haproxy.global_maxconn}}4000{{/haproxy.global_maxconn}}
pidfile /var/run/haproxy.pid
user haproxy
defaults
log global
maxconn 8000
maxconn {{#haproxy.service_maxconn}}{{.}}{{/haproxy.service_maxconn}}{{^haproxy.service_maxconn}}150{{/haproxy.service_maxconn}}
retries 3
timeout http-request 10s
timeout queue 1m
@ -37,7 +37,7 @@ listen {{name}}
{{.}}
{{/options}}
{{#nodes}}
server {{name}} {{ip}}:{{port}} check inter 2000 rise 2 fall 5{{#extra_server_params}} {{.}}{{/extra_server_params}}
server {{name}} {{ip}}:{{port}} check inter 2000 rise 2 fall 5 {{#service_maxconn}}maxconn {{.}}{{/service_maxconn}} {{#extra_server_params}} {{.}}{{/extra_server_params}}
{{/nodes}}
{{/services}}