Question

Host a Second Droplet for LAMP stack Duplication

  • Posted September 6, 2014

Hi there , First time poster : so here is my question is there a way to launch a second droplet that would duplicate droplet 1 just in case the first droplet would go down the second droplet would take over the LAMP stack ? Any guidance is well appreciated .

Subscribe
Share

Submit an 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.

This comment has been deleted

Hi,

Right now we don’t have a load balancer service yet so you would need to setup that step yourself. In order to do it, you can take a snapshot of your first server and then create a new droplet from your snapshot.

Now depending on your application you may need to preserve state between the servers, in which case you can move the DB to a separate machine or employ scripts to sync the content or another mechanism to ensure that data is consistent.

For failover the best way to do it is using a load balancer like HAProxy or you can configure nginx as a load balancer. At the moment we don’t yet have a floating IP which would allow you to setup a redundant load balancer which means you would still have a single point of failure.

Another easy approach is to use round robin DNS. That basically means add double the IP entries to your DNS record so you point www and the domain itself to both IPs of the servers. With modern browsers they do a pretty decent job of querying the DNS server and switching a decent amount of traffic if one of the servers have failed.

We hope to have our load balancing service launched in Q1 of 2015 that would do all of this for you.

Thanks!