-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.cfg
36 lines (36 loc) · 1.03 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
# Global settings
global
pidfile /var/run/haproxy.pid
maxconn 10000
user haproxy
group haproxy
daemon
quite
stats socket /var/lib/haproxy/stats
log 127.0.0.1 local0
## Statistics settings
listen statistics
bind *:1986
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /stats
stats refresh 30s
stats auth keepwalking86:ILoveVietnam$
## Redis HA
listen redis
bind *:6380
mode tcp
timeout connect 6s
timeout server 12s
timeout client 12s
option tcp-check
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:master
tcp-check send QUIT\r\n
tcp-check expect string +OK
server redis1 192.168.10.111:6379 check inter 1s
server redis2 192.168.10.112:6379 check inter 1s
server redis3 192.168.10.113:6379 check inter 1s