Last active
December 13, 2015 16:58
-
-
Save jayjanssen/4944530 to your computer and use it in GitHub Desktop.
PXC haproxy config example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
maxconn 4096 | |
uid 99 | |
gid 99 | |
daemon | |
defaults | |
log global | |
mode tcp | |
balance leastconn | |
option httpchk | |
option tcplog | |
option dontlognull | |
retries 3 | |
option redispatch | |
option nolinger | |
maxconn 2000 | |
contimeout 5000 | |
clitimeout 50000 | |
srvtimeout 50000 | |
listen cluster-reads *:5306 | |
server node1 192.168.70.2:3306 check port 9200 | |
server node2 192.168.70.3:3306 check port 9200 | |
server node3 192.168.70.4:3306 check port 9200 | |
listen cluster-writes *:4306 | |
server node1 192.168.70.2:3306 track cluster-reads/node1 | |
server node2 192.168.70.3:3306 track cluster-reads/node2 backup | |
server node3 192.168.70.4:3306 track cluster-reads/node3 backup | |
# Stats interface | |
listen lb_stats *:9999 | |
mode http | |
balance roundrobin | |
stats uri / | |
stats realm "HAProxy Stats" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment