Bogdan, For my fuel 4.0 deployment it looks like services use the management vip to connect to mysql but :3306 has haproxy listening behind it. I believe that it would be more desireable to make mysql connections result in tcp rst so haproxy can quickly fail.
According to the haproxy documentation I found the option mysql-check works like this:
...the check consists of sending two MySQL packet,
one Client Authentication packet, and one QUIT packet, to correctly close
MySQL session. We then parse the MySQL Handshake Initialisation packet and/or
Error packet. It is a basic but useful test which does not produce error nor
aborted connect on the server.
For reference my haproxy is configured like this:
I changed the config so that my management ips are 10.0.5.x where x is...
.10 management vip
.2 node this config came from
.3 other node
.4 other node
listen mysqld
bind 10.0.5.10:3306
balance roundrobin
mode tcp
option mysql-check user cluster_watcher
option tcplog
option clitcpka
option srvtcpka
timeout client 28801s
timeout server 28801s
server node-16 10.0.5.2:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3
server node-17 10.0.5.3:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3 backup
server node-18 10.0.5.4:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3 backup
Bogdan, For my fuel 4.0 deployment it looks like services use the management vip to connect to mysql but :3306 has haproxy listening behind it. I believe that it would be more desireable to make mysql connections result in tcp rst so haproxy can quickly fail.
According to the haproxy documentation I found the option mysql-check works like this:
...the check consists of sending two MySQL packet,
one Client Authentication packet, and one QUIT packet, to correctly close
MySQL session. We then parse the MySQL Handshake Initialisation packet and/or
Error packet. It is a basic but useful test which does not produce error nor
aborted connect on the server.
For reference my haproxy is configured like this:
I changed the config so that my management ips are 10.0.5.x where x is...
.10 management vip
.2 node this config came from
.3 other node
.4 other node
listen mysqld
bind 10.0.5.10:3306
balance roundrobin
mode tcp
option mysql-check user cluster_watcher
option tcplog
option clitcpka
option srvtcpka
timeout client 28801s
timeout server 28801s
server node-16 10.0.5.2:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3
server node-17 10.0.5.3:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3 backup
server node-18 10.0.5.4:3307 check inter 15s fastinter 2s downinter 1s ris
e 5 fall 3 backup