0

We have setup an HAProxy in TCP mode sitting in front of multiple HTTPS application servers. So far things are working well but wanted to ask about these settings. In my defaults section I have the following settings, which I have commented out (turned off):

# timeout http-request 10s
# timeout queue        1m
# timeout connect      10s
# timeout client       1m
# timeout server       1m
# timeout http-keep-alive 10s
...

By turning these off, does it set them to infinity? Does it instead just choose some default value? I am having trouble finding out what precisely it does.

I would like to have these limits just turned off for now, so hopefully commenting them out works. Would love to get confirmation of that though, so any help is greatly appreciated.

A X
  • 469
  • 4
  • 10
  • 31

1 Answers1

3
timeout http-request <timeout>

This is to set the maximum allowed time to wait for a complete HTTP request

If this parameter is not set, the client timeout still applies between each chunk of the incoming request. It should be set in the frontend to take effect, unless the frontend is in TCP mode, in which case the HTTP backend's timeout will be used.

For more details check HAProxy configurion manuals's timeout http-request section

timeout queue <timeout>

This is to Set the maximum time to wait in the queue for a connection slot to be free

If unspecified, the same value as the backend's connection timeout ("timeout connect") is used, for backwards compatibility with older versions with no "timeout queue" parameter. For more details check HAProxy configurion manuals's timeout queue section.

timeout connect <timeout> or timeout contimeout <timeout> (deprecated)

This is to set the maximum time to wait for a connection attempt to a server to succeed

An unspecified timeout results in an infinite timeout, which is not recommended. Such a usage is accepted and works but reports a warning during startup because it may results in accumulation of failed sessions in the system if the system's timeouts are not configured either. For more details check HAProxy configurion manuals's timeout connect section.

For

An unspecified timeout results in an infinite timeout, which is not recommended. Such a usage is accepted and works but reports a warning during startup because it may results in accumulation of expired sessions in the system if the system's timeouts are not configured either.

timeout http-keep-alive <timeout>

This is to set the maximum allowed time to wait for a new HTTP request to appear

If this parameter is not set, the "http-request" timeout applies, and if both are not set, "timeout client" still applies at the lower level. It should be set in the frontend to take effect, unless the frontend is in TCP mode, in which case the HTTP backend's timeout will be used.

Nur
  • 386
  • 1
  • 7
  • Awesome, thank you! Quick question - what happens if nothing is set anywhere? Are the defaults set to infinity? – A X Aug 12 '19 at 06:10
  • @A br , not all but most of these parameters will fall back to ["timeout client"](https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#timeout%20client) and if that is not set either it may result in results in an infinite timeout. – Nur Aug 12 '19 at 17:30