Hi Michal, On Fri, Feb 19, 2016 at 09:04:00AM +0100, Micha?? Pasierb wrote: > Hi, > > Is it possible to influence how HAProxy handles HTTP keep-alives to backend > servers ? I want it to close TCP connection after x many HTTP requests. > Also a max-age time for single TCP connection cloud be useful.
No, for now we don't have such a thing. I wanted to implement it a long time ago when some application servers were leaking memory over established connections, but when we released server-side keep-alive in haproxy, such servers didn't exist anymore so there was no point doing so. > These features are available in F5 LTM OneConnect ( > https://support.f5.com/kb/en-us/solutions/public/7000/200/sol7208.html) > as *Maximum > Reuse* and *Maximum Age*. > > Goal is to move all TIME_WAITs to HAProxy host instead of creating them on > backend servers. Are you crazy ??? A TIME_WAIT on a listener costs nothing (well, 56 or 84 bytes of memory depending on the address family, almost nothing). My personal record is 5.5 millions on a server. A TIME_WAIT on the client side *prevents* future outgoing connections from being established! You must never ever try to get a TIME_WAIT on an outgoing connection, or you're dead. Regards, Willy

