HAProxy community

Backend queue question


In the image above, the backend servers are quite idle ( <50 connections) while the backend current queue value has not changed in 30 minutes. Also, why would it form a queue, since I’ve got no limits on the backends?

Thank you.


Actually, you seem to have a limit set to 1500 on each server.
The queue is currently empty, but the number “2” you see is the MAXimum length the queue has reached since the start up of the process.

Hello and thank you for the reply.

What’s bothering me is the 4 bil or so number in the backend section. Under all the servers, there’s “Backend” with the current queue of 4 294 963 108. As far as I know, each server has its own queue and there’s a backend queue, requests that will be delivered to one of the servers, as soon as they won’t be loaded anymore…? Am I wrong?
That’s the number that I have no idea where it’s coming from…?

Thank you.

It all depends on your configuration. (can you share it by the way)

If no persistence is used and a server maxconn is reached, then HAProxy will exclude this one from LB algorithm and will select an other server for handling next request.
In such case, you should rarely see any connection in queue unless ALL your UP servers reached their maxconn.
The backend queue will grow at this point.

If you need persistence (or use a deterministic algorithm like balance source), then the server queue may fill up with requests who has to point to this server. HAProxy honors persistence before queueing.
Backend queue may still grow only if all servers are saturated AND for new connections only (those where we don’t have any persistence information yet).