Not balancing in a round'n'robin behaving

Hi Folks, hope you all are doing well.

I’ve setup a HAproxy instance to balance two “identical” servers.

The setup is working, but when I execute stress tests on that the sup07 (the balancer), looks like machine sup05 gets two times more requests than machine sup06.

The setup is:

[root@sup07 ~]# cat /etc/haproxy/haproxy.cfg
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy

log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000

frontend Calls_Pool_Diagnostics
bind *:8680/RTDM/PoolDiangostics.jsp
default_backend Balances_Pool_Diagnostics
backend Balances_Pool_Diagnostics
balance roundrobin
server sup05 check
server sup06 check

frontend Calls_RTDM_Event
bind *:8680/RTDM/Event
default_backend Balances_RTDM_Event_requests

backend Balances_RTDM_Event_requests
balance roundrobin
server sup05 check
server sup06 check

frontend HAProxy_page
bind *:80
stats uri /haproxy?stats
backend http_back

Could you help me understand why is it behaving like this?

I appreciate your help.

Take into account that HAProxy does implement HTTP keep-alive both for the frontend and backend side of the connections. Therefore depending on how you benchmark (which could also be using keep-alive) it might skew the results.

However in my experience if one uses the option forceclose in the backend, then an almost perfect round-robin behaviour emerges. (Although I would use this option only with backends that target a service on the same machine as the balancer.)