forked from haproxy-unofficial-obsolete-mirrors/haproxy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbackup-all-sh.cfg
35 lines (31 loc) · 1.26 KB
/
backup-all-sh.cfg
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
# This is a test configuration.
# It must load-balance across backup servers depending on the souce hash.
# Check local apache logs to verify :
#
# tail /var/log/apache/access_log
global
maxconn 100
listen sample1
mode http
option httplog
option dontlognull
retries 1
redispatch
contimeout 1000
clitimeout 5000
srvtimeout 5000
maxconn 40000
bind :8081
balance source
option allbackups
server srv1 127.0.0.1:80 cookie s1 check port 81 inter 1000 fall 1
server srv2 127.0.0.2:80 cookie s2 check port 81 inter 1000 fall 1
server srv3 127.0.0.3:80 cookie s3 check port 81 inter 1000 fall 1
server srv4 127.0.0.4:80 cookie s4 check port 81 inter 1000 fall 1
server bck1 127.0.1.1:80 cookie b1 check port 80 inter 1000 fall 1 backup
server bck2 127.0.1.2:80 cookie b2 check port 80 inter 1000 fall 1 backup
server bck3 127.0.1.3:80 cookie b3 check port 80 inter 1000 fall 1 backup
server bck4 127.0.1.4:80 cookie b4 check port 80 inter 1000 fall 1 backup
server bck5 127.0.1.5:80 cookie b4 check port 80 inter 1000 fall 1 backup
option httpclose
errorloc 503 /503