Hey, I am running a database and webserver, on one cloud instance (server1).
However I want to have a running backup (server2), so if I need to restart or update server1, i want server2 to be live on my domain. I could change the DNS but that takes 24 hours to react - there must be a better way? Some sort of load balancing server in front of server1 and server2, where I can switch where the traffic should go to? What can you recommend of servers/software for this?
Thanks
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,
I could suggest using Haproxy as a load balancer. You could add your server1 and server2 to the pool and that way Haproxy would load balance the traffic to the two servers.
If you need to upgrade server1, you could remove it from the pool and the traffic would be forwarded to server2 only.
For more information you could take a look at this tutorial here:
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.