document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. global
  2.   log 127.0.0.1 local6
  3.   maxconn  ${haproxy-conf:maxconn}
  4.   user     ${haproxy-conf:user}
  5.   group    ${haproxy-conf:group}
  6.   daemon
  7.   nbproc 1
  8.  
  9. defaults
  10.   mode http
  11.   option httpclose
  12.   # Remove requests from the queue if people press stop button
  13.   option abortonclose
  14.   # Try to connect this many times on failure
  15.   retries 3
  16.   # If a client is bound to a particular backend but it goes down,
  17.   # send them to a different one
  18.   option redispatch
  19.   monitor-uri /haproxy-ping
  20.  
  21.   timeout connect 7s
  22.   timeout queue   300s
  23.   timeout client  300s
  24.   timeout server  300s
  25.  
  26.   # Enable status page at this URL, on the port HAProxy is bound to
  27.   stats enable
  28.   stats uri /haproxy-status
  29.   stats refresh 5s
  30.   stats realm Haproxy statistics
  31.  
  32. frontend zopecluster
  33.   bind ${haproxy-conf:bind}
  34.   default_backend zope
  35.  
  36. # Load balancing over the zope instances
  37. backend zope
  38.   # Use Zope\'s __ac cookie as a basis for session stickiness if present.
  39.   appsession __ac len 32 timeout 1d
  40.   # Otherwise add a cookie called "serverid" for maintaining session stickiness.
  41.   # This cookie lasts until the client\'s browser closes, and is invisible to Zope.
  42.   cookie serverid insert nocache indirect
  43.   # If no session found, use the roundrobin load-balancing algorithm to pick a backend.
  44.   balance roundrobin
  45.   # Use / (the default) for periodic backend health checks
  46.   option httpchk
  47.  
  48.   # Server options:
  49.   # "cookie" sets the value of the serverid cookie to be used for the server
  50.   # "maxconn" is how many connections can be sent to the server at once
  51.   # "check" enables health checks
  52.   # "rise 1" means consider Zope up after 1 successful health check
  53.   server  plone${ports:instance1} ${hosts:instance}:${ports:instance1} cookie p${ports:instance1} check maxconn 2 rise 1
  54.   server  plone${ports:instance2} ${hosts:instance}:${ports:instance2} cookie p${ports:instance2} check maxconn 2 rise 1
  55.   server  plone${ports:instance3} ${hosts:instance}:${ports:instance3} cookie p${ports:instance3} check maxconn 2 rise 1
');