Reference
set maxconn server
On this page
Change a server’s maximum concurrent connections (maxconn) setting.
Description Jump to heading
You can define a maxconn setting on each server line in a backend section of your configuration. This limits the number of concurrent connections that the load balancer will relay to that server. When this limit is reached, connections queue up in the backend until a server slot becomes free.
haproxybackend webserversserver s1 192.168.0.10:80 maxconn 30server s2 192.168.0.11:80 maxconn 30server s3 192.168.0.12:80 maxconn 30
haproxybackend webserversserver s1 192.168.0.10:80 maxconn 30server s2 192.168.0.11:80 maxconn 30server s3 192.168.0.12:80 maxconn 30
Use the set maxconn server command to change this limit dynamically. A value of zero is allowed.
Examples Jump to heading
Below, we set the server s1 in the backend webservers to have a maxconn of 20:
nixecho "set maxconn server webservers/s1 20" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nixecho "set maxconn server webservers/s1 20" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?