On Sat, Mar 01, 2014 at 11:06:32PM +0530, vijeesh vijayan wrote:
> Thanks. will share screenshot shortly. roundrobin recommented for mysql
> also?

What Baptiste is explaining is that leastconn focuses on balancing
the number of established connections and not the cumulated number
of connections. If one server responds slowly and the other responds
fast, the slow one will always have a certain number of open
connections while the fast one will have very few. Thus it is normal
that haproxy will pick the fast one more often than the slow one. And
this is precisely the purpose of leastconn.

Some people use leastconn to avoid servers which are suffering from
some local system perturbations (eg: backups). And in general, what
you're observing means exactly that one server is working much better
than another one.

So round robin will equally distribute the number of requests to your
servers, but will degrade the quality of service since the slow one
will get more requests than right now, and the fast one will remain
mostly idle waiting for the slow one to get its share.

Willy


Reply via email to