Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the haproxy config file, there is a directive called maxconn.

does this directive refer to concurrent connections? Or once the connection is redirected to a server, it is closed? For example, if the maxconn is set to 4000, and in my whole website there are 10k people, would that directive limit that users number?

Thank you

share|improve this question

It sets the maximum number of concurrent connections. Each connection lasts as long as that request (or, with keep-alive, that set of requests).

So, yes, if all 10,000 users are making a request at the exact same time, then a maxconn setting of 4000 will limit that.

Additionally, most modern browsers open more than one TCP connection when they have a long list of resources to request - this multiplexing allows for resources to load more quickly in general, but increases the effective number of connections that your load balancer sees.

share|improve this answer
then, how can I make haproxy hold more than number of users? – Enrico Tuttobene Apr 22 '12 at 22:05
@EnricoTuttobene: Simply, increase the limit to an acceptable value. – Khaled Apr 23 '12 at 7:21
yea but what about when i will have 100 machines and 100.000 connections? maybe more? still they all rely on the loadbalancer server. – Enrico Tuttobene Apr 23 '12 at 15:24
You'll need scale to more than one load balancer eventually. – Shane Madden Apr 23 '12 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.