Luke86
By:
Luke86

Have two droplets in a RAID type configuration

July 17, 2017 347 views
Backups Load Balancing Ubuntu 16.04

I am hosting several (30) low traffic Wordpress websites on a droplet and was wondering if there is a way I can have two droplets that are identical. So that I can use a load balancer to ensure that the websites never go offline.

Now I understand that I can clone and use images but if I update or upload content to one of the websites I would have to update the same website on the other server.

In my head I envisage things to run like a RAID harddrive, all data is cloned onto two drives so if one fails the other is still accessible.

Any help or advice is very much appreciated.

1 Answer

Hi @Luke86

To setup high availability, you would setup multiple database servers, storage servers and application servers. Hosted in different data centers.
You cannot share a database like MySQL across multiple active database servers just on the file level. But you would run it in a master-slave or master-master type of setup.
For storage, you would run something like GlusterFS, so you could share the media storage across multiple servers.
And then you would run multiple application servers running the Apache/Nginx and PHP. And the application server could even be split up even further, by putting Apache/Nginx on one and PHP on another.

All in all, it's a little complicated, but aiming for 100% uptime doesn't come easy.
A simple way having a lot of uptime on a static website would be to use a cache service like CloudFlare (or setup your own), which would serve the website even if the backend (WordPress) was down, since it would serve all known pages from it's cache.

Have another answer? Share your knowledge.