HAProxy community

Cannot make fixed balancing with "leastconn"

Hi,

I’m tying to make a very silple thing : bascivc configuration, with one frontend, associated with 6 backend, no weight, and using “balance leastconn”, “mode tcp”.

When I connect 6 connections on “frontend”, from 6 different clients, one connection performed every second, I was expecting having one tcp connection on each of my 6 backends. Tsi is not the case, behaviour is randop : in most case, at least one backend has 2 or more connections, and at least one has no connection, which is bad …
“laxconn” to one is not a good solution, since in case I loose a backend, I’m afraid it will not allow 2 connexions on backend (which would be necessary in this case).

Thanks for any idea,

Guenhaël