Hi Cyril! On Wed, Mar 15, 2017 at 11:48:01AM +0100, Cyril Bonté wrote: > As a reminder (to me), I sent a patch in december (just before the 1.7.0 > release), which immediately closes the HTTP keep-alived connections. > Currently, during the soft stop, HTTP connections are only closed when a > request is processed, it doesn't do anything on connections already in an > idle state.
Ah yes I vaguely remember about this discussion now. > I didn't spend more time on it but having a quick look at it, it may be ready > to merge soon. Cool! > About TCP connections, while I wrote the patch, I was thinking about a global > "grace timeout", which will enforce haproxy exit if the soft stop takes too > long (for example when tcp connections don't expire). Something like : > > global > grace 30s It's pretty similar to what we have with the "grace" setting in frontends which maintains the listener alive for some time and automatically shuts it down. And yes I think it does make sense because in the end people complain about "too old" processes. Please note, if you go down that route, you don't need to kill idle sessions upon signal receipt anymore, all of them should be dealt with by this grace period. That will make http quit even more cleanly as well. In the past I thought about shortening the client/server timeouts upon reload, or switching them to client-fin and server-fin only. But that wouldn't work because some connections can remain very active for a long time and would never die. > Would it be something acceptable Willy ? Yes I think that this grace setting would solve all use cases and avoid having to kill each and every pending connection (they would simply go away with the process). And since it's a new setting we could possibly even imagine backporting it to 1.7 if there's strong demand and it's riskless. Cheers, Willy

