I’m trying to create a High Availability WordPress instance. These is what I think I need
From what I was reading, Digital Ocean’s Load Balancers handle their own failover which is why I don’t think I need a floating IP and two load balancers - please correct me if I’m wrong.
In order to keep WordPress’s wp-content directory in sync, I need to use GlusterFS, otherwise, how would I keep the theme and plugin files in sync? What happens if I need to add another node?
To make sure that storage isn’t an issue, I want to mount Digital Ocean Spaces to the uploads directory, but I’m confused on how this will affect GlusterFS. I planned on doing this with the WordPress plugin. Will there be problems because there are two backend servers potentially writing to the same files?
I was also thinking of using Digital Ocean’s CDN but wasn’t exactly sure if this was necessary due to CloudFlare.
I want to automatically renew the Let’s Encrypt SSL certificate so I don’t have to manually do this everytime it is about to expire, but how do I achieve this? I keep reading that the Digital Ocean API can achieve this but I’m a little confused as to where I should generate the cert and then what kind of script I need to run to update the cert on the Load Balancer.
I want to use Cloudflare for security and caching reasons. Will using Cloudflare’s proxy/caching mechanism work on Digital Ocean’s Load Balancer?
Finally, I’m confused on what happens with the database if both load balanced servers are writing to the same table entry.
Any help would be appreciated on what I need to do to get this all working. I figured I would go in this order
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.
Hi Tanner, Did you get the plugin installation issue resolved? I’m looking to do a setup similar to what you’ve described here.
This may help in case anyone decides to use Cloudflare in front for SSL: https://community.letsencrypt.org/t/cert-for-digital-ocean-load-balancer-cloudflare-dns/75974/9
if anyone is following, everything is working except plugin installation, I’m not sure what is causing this but there is a 504 error being reported by Cloudflare which I’m still looking into.
Looks like this might be the tutorial I’m looking for: https://deliciousbrains.com/scaling-wordpress-network-filesystem/
Reading more about it, it sounds like I cannot offload the media folder and do GlusterFS at the same time. I would prefer to just use Digital Ocean Spaces but I’m unable to find any information on if rsync is good enough to keep the wp-content folder’s in sync.
Adding this as a bookmark so I remember this must be done: https://feliciano.tech/blog/running-wordpress-behind-an-sslhttps-terminating-proxy/