Report this

What is the reason for this report?

Load balance and fail over for MySQL droplets

Posted on March 19, 2014

I’m looking for recommendations on how I could load balance two MySQL droplets. I have multiple droplets that will connect to these two droplets and there may be more than two eventually. Data replication is already setup but I’m unsure of how I could get my droplets to send the load between the two and have fail over.

By the way, I’m using the Percona XtraDB Cluster.

Thanks for any help.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I have not personally attempted something similar with mysql but. If I were going to try this, I would think about putting a load balancer server between mysql instances and the droplets that will connect to them. Perhaps something like HA proxy. We configure this proxy by telling it what its backends are and when to connect to each(perhaps a round robin) And then all your droplets would connect to the proxy server without caring how many sql you have. <br> <br>When you want to add an additional mysql, it’s a simple matter of settign up the replication, and adding its ip to the proxy list of backends so that it includes it as a possible reference…

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.