HAProxy Maintain Connections to Backend regardless of Frontend Connections

connectionhaproxy

Is there a way to configure HAProxy to maintain an X number of open HTTP connections to the backend that get reused by new HTTPS connections (i.e. requests) to the frontend, and keep the backend connections open even after the frontend connections are closed?

Thank you!

Best Answer

There is an http-reuse option http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4-http-reuse

This will make HAProxy send HTTP requests for a given HTTP session using already established connections of a different HTTP sessions. But it won't maintain any open connections if the there is no more frontend connections. I don't think that HAProxy can do it anyway.