-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.cfg
30 lines (29 loc) · 997 Bytes
/
haproxy.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
global
log 0.0.0.0 local1 warning
maxconn 1000
master-worker
stats socket /usr/local/etc/haproxy/api.sock mode 660 expose-fd listeners level user
defaults
log global
mode tcp
listen stats
bind *:8080
mode http
option httpclose
balance roundrobin
stats enable
stats uri /
stats realm Haproxy\ Statistics
stats show-legends
stats hide-version
listen redis-cluster
bind 0.0.0.0:6379
mode tcp
option tcpka
option tcplog
option tcp-check
tcp-check send info\ replication\r\n
tcp-check expect string role:master
server redis01:6379 172.23.0.11:6379 check port 6379 check inter 2s downinter 4s rise 3 fall 2 on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions
server redis02:6379 172.23.0.12:6379 check port 6379 check inter 2s downinter 4s rise 3 fall 2 on-marked-down shutdown-sessions backup
server redis03:6379 172.23.0.13:6379 check port 6379 check inter 2s downinter 4s rise 3 fall 2 on-marked-down shutdown-sessions backup