timeout connect 10000 # default 10 second time out if a backend is not found

timeout connect <timeout>
timeout contimeout <timeout> (deprecated)
  Set the maximum time to wait for a connection attempt to a server to succeed.


  设置最大值来等待一个连接尝试成功连接到一个服务器


  如果serber 是和haproxy 在同一个LAN里,连接应该是立即的( 小于几毫秒).

  无论如何, 这是一个很好的实践来覆盖一个或者多个TCP 包丢失通过指定timeouts  略高于3秒(比如4或者5秒)


 此参数是特定于backends,可以指定一次对于所有的 在 "defaults" sections。



 这事实上是一个最简单的解决方案之一,而不是忘记它。


 一个未指定超时结果在一个无线的timeout, 这是不推荐的。

  timeout connect 10000 # default 10 second time out if a backend is not found

posted @ 2016-06-27 10:03  czcb  阅读(186)  评论(0编辑  收藏  举报