HAPROXY send 2 requests at time (roundrobin strange behavior )

Hello,

I’m novice in HAPROXY, i’am using 1.8 V
bellow my roundrobin configuration :

=========================
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon

defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
option forwardfor
option http-server-close

frontend Loadbalancer_Prod
bind *:80
mode http
default_backend Nodes_Prod

backend Nodes_Prod
mode http
balance roundrobin
option forwardfor
server AMASERVER1 x.x.x.x:port1 check
server AMASERVER2 x.x.x.x:port2 check

frontend Loadbalancer_Test
bind *:8080
mode http
default_backend Nodes_Test

backend Nodes_Test
mode http
balance roundrobin
option forwardfor
server AMASERVER1 x.x.x.x:port1 check
server AMASERVER2 x.x.x.x:port2 check

listen stats
bind *:88
mode http
stats enable
stats uri /stats
stats realm HAProxy\ Statistics
stats auth admin:admin

=============================
The problem is when i use my Haproxy’s link one time and i see at stats i found that my proxy send tow requests at time for both servers 1 & 2 not in turns as should be in roundrobin mode

Did you have any solution for me ?

Thanks

I’m not sure what you are saying. Can you provide the logs and explain based on the logs the difference between what you see and what you expect?

When i send one http request from my LBalanced.link.com i have this in my stats :
lb-after

what i expact is to see only 1 request for SERVER1 and 0 request for SERVER2
So for me Roundrobin is not working and don’t know what wrong with my conf ?!

I assume those are two different requests.

Check the haproxy logs, to get more informations.

Yes this is the problem, when i send one request from my LBalanced.link.com logs say that :

Nov 27 10:49:08 localhost haproxy[8981]: My_@IP:50209 [27/Nov/2018:10:49:08.570] Loadbalancer_Prod Nodes_Prod/SERVER1 0/0/1/1/50 200 55719 - - ---- 1/1/0/0/0 0/0 “GET / HTTP/1.1”
Nov 27 10:49:09 localhost haproxy[8981]: My_@IP:50209 [27/Nov/2018:10:49:09.112] Loadbalancer_Prod Nodes_Prod/SERVER2 0/0/1/2/4 200 55719 - - ---- 1/1/0/0/0 0/0 “GET /favicon.ico HTTP/1.1”

So effectively my loadbalancer re-send 2 requests when i send him only one
Did you have any idea what can be the root cause ? or at least can you confirm if my config is good ?

Thank you

Hello,

You have 2 differents requests here :
1 for / and second one for favicon

Everything looks fine for me.

1 Like

Ok i understand
Thank you for your help