Hi Aleks, Sorry, I was a bit unclear about the initial request, it was more about the timeout on keep alive connections than the actual support of the Keep-Alive header!
I did review the manual for it, the http-keep-alive option isn't the option I'm looking for, as "It will define how long to wait for a new HTTP request to start coming after a response was sent.". This makes it more of an 'idle timeout'. I'd like the ability to, after exactly (for example) 10 minutes, forcibly close the client socket regardless of it's current state or what it's doing. All the timeouts I've found in haproxy seem to related more to 'idle timeouts': * timeout http-keep-alive - Amount of time until a socket is closed because it's been idle and hasn't sent a request * timeout client - Amount of time until a socket is closed because it's expected to send data but has been idle for this period. * timeout http-request - Amount of time until a socket is closed because it hasn't sent a complete HTTP request in this time. None of these really provide the type of behaviour I'm expecting, for a small amount of context: >From a firewall perspective all sockets are configured to forcefully stop after about 20 minutes after which time a connection will go 'stale' and no longer function, any additional packets on that socket will be ignored. This is fine for our purposes, but when keep-alive comes into play this raises some problems. Theoretically using all the timeouts available in haproxy it's tentatively possible to maintain a connection for *LONGER* than that period, at which point the connection gets silently dropped, and in haproxy the connection fails in a non-graceful way. Ideally, obviously, I'd like for haproxy to have a way to close the connection as gracefully as possible after X minutes, rather than the current scenario where it may get killed ungracefully. Running v1.6.4 Cheers. On Mon, Apr 25, 2016 at 2:20 PM, Aleksandar Lazic <[email protected]> wrote: > Hi. > > Am 25-04-2016 14:01, schrieb Craig McLure: >> >> Hi, >> >> Does HAProxy support the Keep-Alive header, and a 'max connection >> duration' for Keep-Alive connections? >> >> I've poured through the manual, but can't see anything obvious, but it >> would be useful for better control over Keep-Alive connections. > > > please can you show us haproxy -vv > > and maybe this could help > > http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-timeout%20http-keep-alive > http://cbonte.github.io/haproxy-dconv/configuration-1.6.html#4-timeout%20http-keep-alive > > found it with search in the page. > > There are more keep alive settings on this page ;-) > > Best regards > Aleks

