@ebarlas wrote:
I have a simple goal: I’d like to load balance a couple servers using the
uri
hash balance algorithm and I’d like to support persistent connections to haproxy with load balancing for each request. Unfortunately, I haven’t been able to achieve this behavior. I’ve tried a variety of configurations, namelyoption http-keep-alive
, but nothing is working. The configuration file is below.The behavior I’m witnessing is the hash is used on the first request to bind to a server for the duration of the persistent client connection. I was able to achieve load balancing per request with
option httpclose
, but that prevents persistent client connections. Is there a way to have persistent client and server connections with load balancing on each request?In summary, I see tunnel behavior and not keep-alive behavior.
I using HA-Proxy version 1.8.14-52e4d43 2018/09/20
global daemon frontend http-in mode http timeout client 60s bind *:8080 default_backend servers backend servers mode http timeout connect 5s timeout server 60s balance uri option httpchk GET /health http-check expect status 200 server server1 <ip>:<port> check server server2 <ip>:<port> check
Posts: 1
Participants: 1