I think I'm overlooking something simple, could someone spot check me?

What I want to do is to pool connections on my http backend - keep HAProxy
from opening a new connection to the same backend if there is an
established connection that is idle.

My haproxy version is 1.5.18

In my defaults section I have:

  timeout http-request 5s
  timeout http-keep-alive 75s

In my backend definition I have:

  mode http
  option http-keep-alive
  balance roundrobin

What I see in the packet capture is:

  The client makes an http/1.1 request w/ no Connection header (haproxy ->
backend)
  The server gives an an http/1.1 response with content-length and no
connection header (backend -> haproxy)
  5s later Haproxy closes the connection

There is more then enough traffic going through the backend that if a
connection is idle, there will be a request that could use it (within ms,
should never hit the 5s or 75s timeouts), however in every case the
connection just sites idle for five seconds then closes.

Am I missing something simple to enable this behavior?

Reply via email to