This is my current test setup:
- SQL0: 192.168.22.64 (master+slave)
- SQL1: 192.168.22.65 (master+slave)
- loadbalancer0: 192.168.22.66
- loadbalancer1: 192.168.22.67
- Virtual IP: 192.168.22.80
The Loadbalancers are connected to eachother using heartbeat, and both of them run MySQL-Proxy.
Everything works like a charm; one of the SQL server dies, everything stays up. One of the LBs die, everything stays up.
However, when checking which SQL server is being used, I noticed it's always the same, unless that one becomes unavailable.
After a couple of hours SQL1 for example has 600.000 queries, whereas SQL0 has, say, 20.000.
Is there a way to balance it more, to come near ~50% SQL0, and ~50% SQL1?
This is my basic line I start the proxy with:
/usr/bin/mysql-proxy --proxy-skip-profiling -b 0.sql.domain.com:3306 -b 1.sql.domain.com:3306 --keepalive -P :3306
As proof, here a test run every 10 mins since yesterday afternoon.