By piyushkumar
I have configured mysql master-slave replication in centos 7, and I want to use this in such a way that by default my domain fetch data from slave server but when it is down it automatically starts fetching database from master server.
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!
Hello,
You would need either load balancer or logic built into your application in order to load balance the connections to the different replicas.
If you decide to use a load balancer, you could have a look at one of the following:
ProxySQL
MariaDB MaxScale
HAProxy
DigitalOcean managed load balancer
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.