HAProxy community

Http : small client timeout with big server timeout?


In a lot of documentation and tutorial, the recommendation is to have client timeout = server timeout.

I have some bad customer applications, mainly backoffice, where some http reponse can take 5-10min.
(Something like invoice generation, when the user need to wait 10min in his browser. yes, that’s crappy.)

So, I need to increase server timeout in this case. (in a specific backend).

I would like to avoid to increase client timeout, and keep a safe value (30s-60s), to avoid bad client keeping open connections. (I have seen bad case, with hitless reload, where old haproxy can be stuck for hours, waiting than connections are closing).

It is safe to keep a client timeout to 30s, with server timeout of 10min for example ?
I’m not sure of the behaviour of browser ? does it send some packet to keep connections open ?

Yes, it would say this is a good reason to use different values. Nothing will suddenly break because of this, and different timeout values between client and server is definitely fully supported despite the recommendation.