haproxy.cfg.in 1.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
global
  maxconn 4096

defaults
  log global
  mode  http
  option  httplog
  option  dontlognull
  retries 1
  option redispatch
  maxconn 2000
12 13 14 15 16 17 18 19 20 21 22 23 24
  # it is useless to have timeout much bigger than the one of apache.
  # By default apache use 300s, so we set slightly more in order to
  # make sure that apache will first stop the connection.
  timeout server 305s
  # Stop waiting in queue for a zope to become available.
  # If no zope can be reached after one minute, consider the request will
  # never succeed.
  timeout queue 60s
  # The connection should be immediate on LAN,
  # so we should not set more than 5 seconds, and it could be already too much
  timeout connect 5s
  # As requested in haproxy doc, make this "at least equal to timeout server".
  timeout client 305s
Aurel's avatar
typo  
Aurel committed
25
  # Use "option httpclose" to not preserve client & server persistent connections
26
  # while handling every incoming request individually, dispatching them one after
27 28 29
  # another to servers, in HTTP close mode. This is really needed when haproxy
  # is configured with maxconn to 1, without this options browser are unable
  # to render a page
30
  option httpclose
31 32 33 34 35 36 37 38 39 40 41

listen %(name)s %(ip)s:%(port)s
  cookie  SERVERID insert
  balance roundrobin

%(server_text)s

  option httpchk GET %(server_check_path)s

  stats uri /haproxy
  stats realm Global\ statistics