-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.conf
40 lines (32 loc) · 1.04 KB
/
haproxy.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
global
log ${hosts:syslog}:${ports:syslog} local0
maxconn ${limits:open-files}
defaults
mode http
option httpclose
option abortonclose
retries 3
option redispatch
monitor-uri /_haproxy_ping_
timeout connect 7s
timeout queue 300s
timeout client 300s
timeout server 300s
# Enable status page at this URL, on the port HAProxy is bound to
listen stats ${hosts:haproxy}:${ports:haproxy-stats}
stats enable
stats uri /
stats refresh 5s
stats realm Haproxy statistics
frontend loadbalancer
bind ${hosts:haproxy}:${ports:haproxy}
default_backend zope_default
# Backend for all nodes.
backend zope_default
# Load balance based on number of connections
cookie serverid insert nocache indirect
balance roundrobin
# Record where we've been
rspadd X-Cluster:\ default
server plone1 ${hosts:plone1}:${ports:plone1} cookie p${ports:plone1} check maxconn 3 rise 1 inter 10000 fastinter 2000
server plone2 ${hosts:plone2}:${ports:plone2} cookie p${ports:plone2} check maxconn 3 rise 1 inter 10000 fastinter 2000