Host a Second Droplet for LAMP stack Duplication

September 6, 2014 1.6k views

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 .

2 Answers


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.


  • Hi moisey ,

    Thank you for the fast reply and for the leads .
    i will definitely look into those .

    Although with hopefully a load balancing service right around the corner of 2015 .
    I'll maybe wait until the service pops online .
    Regarding that service , this would just automatically duplicate the first droplets LAMP stack and provide a load balancing feature ?

  • The load balancing feature would just take care of the load balancing portion, you would still need to duplicate your own droplets to tell the load balancer what to point to.

Have another answer? Share your knowledge.