On Wed, Sep 12, 2012 at 07:48:39AM +0200, Baptiste wrote:
> Hi,
> 
> HAProxy can support as many backend as you need, and as many servers as well.

There is one limit for the roundrobin algorithm. It is limited to 4128
servers per backend because of the internal computations on weights. In
fact, you can go higher by lowering all the weights to avoid the integer
overflow, but this becomes insane and risky in my opinion.

I'm aware of one site who's running with more than 1000 servers, though
I don't know precisely how many.

> As you said, health check could take some CPU ressources, but depends
> on what does your architecture look likes, there may be advatange to
> configure HAProxy to use several process and let the kernel bind them
> on different CPUs.
> One key point as well is the healthcheck frequency..

It's exactly that. From my experience, when you're running more than
around 20000-40000 health checks per second, the network stack and
connectivity starts to suffer because of the cost of finding a spare
source port, and the number of packets exchanged per second, which
start to cause some latency at all layers (NIC, kernel, haproxy).

Unless you'll be running with that many health checks, you don't need to
worry and keeping one process should be fine. Keep in mind that 20000
health checks per second for 4000 servers means that you're using a
check interval of 200ms. If you really need to run multiple processes
because of the load, then you can use the bind-process directive in your
frontends and backends to split the load across multiple processes and
let the system assign them to CPUs.

Regards,
Willy


Reply via email to