I see many benchmark articles about how much concurrent connections the HAProxy can handle
But I don’t see any articles about how much servers at backend, the HAProxy can handle.
Is there can be a limitation of the number of server at backend?
I saw the limitation is 4095 when round robin is used, at the document HAProxy version 2.6-dev0 - Configuration Manual
When I search “max server” at this community page, I saw some articles that said above 100 servers can make problems such as memory usage, or DNS auto-resolve and so on.
I wonder how the HAProxy performance(Memory usage, CPU usage and so on) can be degraded according to the number of backend server.
Could you give me some help?
I check the source code but I think I don’t fully understand it.
But I think the maximum number of backend servers can adds small loads compared to the number of connections.
The reasons I think are below.
- Irrespective of the number of backend servers, when the new stream is arrived, the stream process is same before calling
- the different point when the number of server is increasing, is at
assign_server, which is called in order at,
- At the
assign_server, the server at backend is assigned to the stream according to the load balancing aldogithm.
- Assuming roundrobin, it calls
fwrr_get_next_server which search the next servers using elastic binary tree(eb tree).
- ebtree seems to be initilialized at
fwrr_init_server_groups called at
In summary, I think the number of server at backend just adds loads like
- memory for saving the server list and eb tree.
- searching time when using round robin.
Conclusionally, compared to load from lots of establishing connections, the load from the big number of server looks small, I think.
Any comments would be appreciated.
I also found this pictures at /haproxy_git/doc/queuing.fig.
In this picture, I think the number of server at a backend is related only with