Hi HAproxy community, In our HAproxy deployment, access to runtime API is extremely critical, it is used for:- - collecting metrics - managing servers in a backend (SoT is not DNS, so we have to use runtime API), etc
I observed that, when soft-stop is in progress, we get the following error while performing a connect. connect(5, {sa_family=AF_UNIX, sun_path="path/to/haproxy.sock"}, 60) = -1 ECONNREFUSED (Connection refused) recvfrom(3, 0x7ffcc675fe10, 519, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable) Due to this, we're unable to perform any operations or collect metrics while haproxy is in soft stop, for us, that's a long time as we use the current settings. close-spread-time 10m hard-stop-after 11m "stats socket" (unix socket) is configured on one of the production frontends, we're using version "version 2.8.0-01b97d-15 2023/09/26". Will it make sense if HAproxy had an option to not disable runtime API during soft-stop, perhaps an argument While exploring the code, I noticed that the soft-stop code stops all "stoppable listeners" <https://sourcegraph.com/github.com/haproxy/haproxy/-/blob/src/proxy.c?L2280>, I wonder if there's a way to make a listener non-stoppable? Are there any workarounds to getting around this limitation, while also retaining the soft-stop behavior? Our reason to use soft-stop is to do best-effort into gracefully draining client connections (send Connection: close). We also don't have a way to drain H2 connections proactively, but that's a discussion for another day. Cheers, Abhijeet (https://abhi.host)