Please help understand Bytes out and in

I have a configuration where I see the number of sessions are evenly distributed to backend server however number of Bytes In and out are very different for all backends. Which is causing uneven load on the backend server and one ends up getting 4k requests however other one gets 10k.

I am using 1.5.8 version with Keepalive and http_tunnel option. Please suggest me how to go about this issue.

1 Like

we are also facing this issue in HAPROXY 1.8 can anyone please help.

Our config:
Frontend:http-tunnel

Backend:http-keepalive with no-http-tunnel

Exactly what is the behavior you guys would like to see?

I am trying to optimize for equal and even bytes in / bytes out in tunnel mode.

Haproxy can send new requests to the server with the lowest number of concurrent sessions (balance leastconn), and if you don’t want keep-alive to the server to also have the same amount of transactions per server, then don’t use tunnel mode or keep-alive mode, use http-server-close mode instead.

But how many bytes come in and out of the server doesn’t affect the load-balancing process in haproxy, and it also doesn’t make a lot of sense.

@lukastribus

We are facing some issue while running HAPROXY our environment.

1.Currently we are using the HAPROXY 1.8 build following are the problems we need to solve basically.

a.> Connection closing should happen with FIN rather than RSTs
b.> Even load balancing based on both session and request in and request out.

Please help us in achieving both these.

Currently we are using two configs in our HAPROXY.

in the frontend block we are using the “option http-tunnel” and in the backend we are using the “option http keep-alive” and also “no http-tunnel”

With the current above setup we can achieve point a , but in point b we can achieve session based even load balancing not request in and request out.

Any help would be deeply appreciated.

Thanks,
AMIT

Remove all those options, and put option http-server-close into your default-section.

@lukastribus for http-server-close it will give RSTs

And you already opened a new topic about this on the mailing list:
https://www.mail-archive.com/haproxy@formilux.org/msg29234.html

Please don’t open the same issue on multiple support channels and don’t go off-topic on other peoples threads.

I have to close the connection with FIN/ACK and also achieve even load balancing

@amitraj please continue this discussion in the mailing list thread instead.