-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathhaproxy.cfg
60 lines (40 loc) · 1.08 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
global
daemon
maxconn 256
defaults
mode tcp
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http
bind :8080
default_backend stats
backend stats
mode http
stats enable
stats enable
stats uri /
stats refresh 1s
stats show-legends
stats admin if TRUE
frontend redis-alpha
bind *:6379
default_backend redis-alpha
backend redis-alpha
mode tcp
balance first
option tcp-check
tcp-check send info\ replication\r\n
tcp-check expect string role:master
server redis-alpha:127.0.0.1:6666 127.0.0.1:6666 maxconn 1024 check inter 1s
server redis-alpha:127.0.0.1:6667 127.0.0.1:6667 maxconn 1024 check inter 1s
server redis-alpha:127.0.0.1:6668 127.0.0.1:6668 maxconn 1024 check inter 1s
backend redis-online
mode tcp
balance first
option tcp-check
tcp-check send PING\r\n
tcp-check expect string +PONG
server redis-alpha:127.0.0.1:6666 127.0.0.1:6666 maxconn 1024 check inter 1s
server redis-alpha:127.0.0.1:6667 127.0.0.1:6667 maxconn 1024 check inter 1s
server redis-alpha:127.0.0.1:6668 127.0.0.1:6668 maxconn 1024 check inter 1s