Question

Multiple droplets hosting 1 website

  • Posted August 15, 2013

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

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.

I personally recommend SaltStack. Set up a salt-master server and three salt-minions which are the webservers and use states to replicate configuration. <br> <br>Install Saltstack: https://salt.readthedocs.org/en/latest/topics/installation/index.html <br>This should get you started with states: http://docs.saltstack.com/topics/tutorials/states_pt1.html

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. <br>There’s also different ways ( like syncing files on update with some custom made scripts - lsyncd is an example ) <br>Also, the sessions between the servers have to use a memcached server <br>

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) ? <br> <br>Thanks again, <br>Francis

Yes, it’s possible. You can use a DNS service like Amazon Route 53 that routes the user to the nearest server.