In order to be able to do this kind of failover, I would recommend using a load balancer. You can take a look at this article here on how to
Also, there are a lot of other Load balancing tutorials here:
I would recommend having a similar setup to this one here:
So 1 Load balancer, 2 web servers, and 1 database server.
Regarding the droplet replication, you could create a snapshot of your existing droplet and create a second droplet from that snapshot. That way you would have an exact copy. If you are going to be making a lot of changes to the files of your app, you could use a service like
lsyncd to replicate your files, or just use DigitalOcean block storage solution and share a specific folder between the two droplets.
Hope that this helps!
DigitalOcean Load Balancers allow you to split incoming traffic between multiple backend servers. Often this is used to distribute HTTP requests between a group of application servers to increase overall capacity. This is a common way to scale your application. There are...