We are pleased to announce the immediate availability of MyTcpProxy version 0.2. This is our solution for load balancing and failover at the TCP protocol. MyTcpProxy can operate as a load balancer for any service that uses TCP, including MySQL. Unlike other solutions balacing load and failover, such as haproxy, MyTcpProxy persistence allow TCP connections at the session, which we recommend, along with failover functionality as a load balancer of trust for MySQL.
To be able to download visit this link.
Sample usage:
Let’s assume that your proxy server has ip 10.0.0.10 and you have 3 mysql servers with ip’s 10.0.0.1, 10.0.0.2, 10.0.0.3.
-
On each mysql server give access to the proxy ip to the databases:
GRANT ALL ON yourdb.* TO my_cluster@10.0.0.10 IDENTIFIED BY ‘your_pass’;
-
Start the proxy with the command:
/usr/bin/myproxy –server 10.0.0.1:3306 –server 10.0.0.2:3306 –server 10.0.0.3:3306
-
Connect mysql to 10.0.0.10 to port 33060
mysql -h 10.0.0.10 -P 33060 -u my_cluster -p
-
Run your queries and enjoy.