0

I'm try to config haproxy to reuse connection(http keep alive) for reduce TCP establish connection cost It's ok for normal request. But for health check, it's alway create new connection to check backend. How can we re-use a connection for health check purpose. Here is my config

balance roundrobin
mode http
option http-keep-alive
option httpchk GET /actuator/health HTTP/1.1\r\nHost:\ 10.1.1.2:8003
server micro-dev 10.1.1.2:8003 check maxconn 2000

Thanks

user3611168
  • 335
  • 1
  • 6
  • 27

1 Answers1

0

Few days agos, I have the same question about this header Connection: close which is unfortunately always added to the request.

The support replied that this behavior is normal.

In fact, the single request health check tells the server to close the connection once the response is returned.

It is not possible to change this behavior.

For more informations read this https://github.com/haproxy/haproxy/issues/560

antoninG
  • 21
  • 4