haproxy 配置
集群配置信息
listen admin_stats
bind 0.0.0.0:8888
mode http
stats uri /dbs
stats realm Global \ statistics
stats auth admin:admin
listen proxy-mysql
bind 0.0.0.0:3306
mode tcp
balance roundrobin
option tcplog
option mysql-check user haproxy
server mysql_1 172.18.0.2:3306 check weight 1 maxconn 2000
server mysql_1 172.18.0.3:3306 check weight 1 maxconn 2000
server mysql_1 172.18.0.4:3306 check weight 1 maxconn 2000
option tcpka