Last active
August 29, 2015 14:22
-
-
Save roblayton/44b23dee2d248e021643 to your computer and use it in GitHub Desktop.
HAProxy config file for a MySQL cluster
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 notice | |
maxconn 2000 | |
user haproxy | |
group haproxy | |
defaults | |
log global | |
mode http | |
retries 3 | |
option redispatch | |
timeout connect 5000 | |
timeout client 10000 | |
timeout server 10000 | |
listen mysql-cluster | |
bind 127.0.0.1:3306 | |
mode tcp | |
option mysql-check user haproxy_check | |
balance leastconn | |
server mysql1 192.168.50.11:3306 check | |
server mysql2 192.168.50.12:3306 check | |
listen stats | |
bind 127.0.0.1:8080 | |
mode http | |
option httplog | |
option dontlognull | |
stats enable | |
stats uri / | |
stats realm Strictly\ Private | |
stats auth user1:password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment