Thanks a lot for the clarifications. So now I understand the differences
between 'maxconn' in different places:

1. if it is in the global section, it specifies the maximum number of
concurrent connections the HAProxy process will handle at any point of time.
2. if it is in a frontend section, it specifies the maximum number of
concurrent connections that particular frontend/proxy will handle at any
point of time. In other words, if I have only one frontend specified in my
config, then normally its 'maxconn' limit should be the same as the
'maxconn' in the global section (can't think of a reason why you should use
something less).
3. If it is on a server option, then it specifies the maximum number of
concurrent connections that particular server will accept from the frontend
at any point of time.

Please let me know if the above understanding is correct. If so, I have
three further related questions:

1. if I have multiple backends (multiple server options), does the sum of
'maxconn' of their server options have to be no more than the 'maxconn' of
their corresponding frontend?
1. does specify a low 'maxconn' for a server option help improve the
performance of that particular server in any way?
2. if the connections to a particular backend are long-lived, e.g.
websocket connections, does it imply that I should set a relatively large
'maxconn' for the server?

Many thanks for your help!


On Mon, Apr 15, 2013 at 1:10 PM, Lukas Tribus <[email protected]> wrote:

> Hi Merton,
>
> maxconn can be configured in multiple places:
>
> - as a per process limit in the global section [1]
> - as a per defaults/frontend/listen limit in the that particular section
> [2]
> - as a per server or server option, for that specific socket or server [3]
>
> All 3 maxconn configurations have a their specific purpose and you can
> configure at the same time.
>
>
> Regards,
> Lukas
>
> [1] http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#3-maxconn
> [2] http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-maxconn
> [3] http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#5-maxconn

Reply via email to