Multiple droplets hosting 1 website

August 15, 2013 4.2k views
Hi guys, I was just wondering if it was possible to host 1 website off of multiple droplets and use load balancing to pick which droplet the user connects to? Thanks in advance, Francis
4 Answers
Yes, it's possible. You can use a DNS service like Amazon Route 53 that routes the user to the nearest server.
Thanks for your reply, but what I meant was how can you replicate the Apache configuration on both servers to display the same website (so when you update a website it updates across all servers) ?

Thanks again,
If the servers are in the same location, you can use 1 droplet as a NFS server and mount that on all servers. You can do this even if the servers are not in the same place, but can become a huge problem.
There's also different ways ( like syncing files on update with some custom made scripts - lsyncd is an example )
Also, the sessions between the servers have to use a memcached server
I personally recommend SaltStack. Set up a salt-master server and three salt-minions which are the webservers and use states to replicate configuration.

Install Saltstack:
This should get you started with states:
Have another answer? Share your knowledge.