Hi, I have a very simple setup for doing load balancing for MySQL DBs.
listen mysql_proxy vip01:3306
mode tcp
option tcpka
balance roundrobin
server mysql01 mysql01:3306 weight 1 check inter 10s rise 1 fall 1
server mysql02 mysql02:3306 weight 1 check inter 10s rise 1 fall 1
backup
I am using the backup option so that mysql02 ONLY begins to receive traffic if
mysql01 is down. The problem with this however is that once mysql01 is back
online it begins to receive traffic gain. I would like mysql02 to stay as the
"primary" until mysql02 fails, so basically if mysql01 goes down mysql01
becomes "backup.
I didn't see much in the docs on how to do this, however i could have missed it
Brian Carpio
Senior Systems Engineer
[cid:[email protected]]
Office: +1.303.962.7242
Mobile: +1.720.319.8617
Email: [email protected]
<<inline: image001.jpg>>

