We are using haproxy with tproxy to front of our various web services.
Most of them are very short lived one-off requests, so we have generally
optimised for closing everything quickly and getting out of the way.  We
have a new case where we would like client keep-alives, while maintain
are traditional quick close on the backend behavior.  We tried removing
"option httpclose", but that did not seem to work.

Is it possible to have haproxy send http keep-alives to the client of
the backend has no keep-alives and is setting "Connection: close"?

global
        maxconn     65536
        pidfile     /var/run/haproxy.pid
        daemon
        nbproc      6
        log         127.0.0.1     local4 debug
defaults
        mode                 http
        log                  global
        option               http-server-close
        option               contstats
        timeout client       9s
        timeout server       9s
        timeout connect      5s
        timeout http-request 7s
        maxconn              65536

listen http_proxy 0.0.0.0:80
        mode http
        stats enable
        stats uri /ha-stats
        stats auth haprox:stats
        source 0.0.0.0 usesrc clientip
        log global
        balance roundrobin
        option httpchk HEAD /live-lb HTTP/1.0

Reply via email to