Find whether HAProxy is limited by frontend maxconn or backend server maxconn, and how long sessions wait in the queue.
HAProxy accepts up to the frontend maxconn but can only hand a session to a backend server with a free slot; anything beyond that waits in the backend queue. The queue wait follows from queue length divided by the pool's service rate. The binding constraint is almost always per-server maxconn rather than the frontend figure, so raising the global maxconn does nothing except turn refused connections into queued ones that eventually hit the queue timeout.
HAProxy Capacity
effective capacity = min(frontend maxconn, servers × per-server maxconn); queued sessions = concurrent sessions − backend capacity.
effective capacity = min(frontend maxconn, servers × per-server maxconn); queued sessions = concurrent sessions − backend capacity. HAProxy accepts up to the frontend maxconn but can only hand a session to a backend server with a free slot; anything beyond that waits in the backend queue. The queue wait follows from queue length divided by the pool's service rate.
The binding constraint is almost always per-server maxconn rather than the frontend figure, so raising the global maxconn does nothing except turn refused connections into queued ones that eventually hit the queue timeout.
This calculator takes 5 inputs: Frontend maxconn, Backend servers, Per-server maxconn, Requests per second, Average session duration. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.