Since our all-team meeting in November of last year I have been chasing the White Whale of WordPress multiregion hosting on Reclaim Cloud. I’ve been experimenting with it on and off since January. You can find the tale of the tape on the bava using the WordPress Multiregion tagged (wpmr) post. This is yet another multiregion post, but this time with a successful implementation of bavatuesdays running across our US West and UK data centers, and it’s replicating perfectly. The proof is in the database!
I am managing the DNS of each of the unique servers through Cloudflare, which allows me to setup DNS-based load balancing that steers traffic towards either the closest server, the fastest server, or at random depending on the settings chosen.
What’s more, the moment one of the two servers goes down all traffic is redirected to the healthy pool, or the server that is not down in this case. That’s the failover, and I tested it for both servers and I immediately was notified via email, which is slick.
So, that is multiregion failover in a nutshell, and we have it working for WordPress instances in Reclaim Cloud. So, the next step was to get Reclaim Hosting’s main WordPress site running on this setup, and this is where things get interesting. In a recent post on how we work at Reclaim I mentioned how Cloudflare would become a larger part of our workflow and infrastructure, and that’s already the case. And I am starting to fully realize the immense power of this resource, and part of it harkens back to the O.G. web, namely www. The tradition of using the subdomain www. before the top-level domain start has a marker to distinguish these resources from FTP or Gopher sites, a kind of resource branding. With the web being the de facto destination for almost all traffic for well mover 25 years, the subdomain might be seen as redundant. But, when it comes to a web where more and more security, traffic shaping, and resource distribution are controlled via DNS with services like Cloudflare, being able to isolate the traffic for your main site to a www subdomain where all top-level traffic is re-directed becomes an increasingly important practice.
So, in the case of Reclaim Hosting’s mainsite our DNS is managed by a different provider than Cloudflare. Often times when you run your domain through Cloudflare you point your nameservers to their’s and then they effectively manage all your records by “flattening” your top-level domain. But changing DNS for all records running through reclaimhosting.com at this point is a non-starter, so how can we still leverage all the benefits of Cloudflare, such as their CDN, DDoS protection, DNS-based load balancing (to name a few) for our main site if we can’t point our main domain’s nameservers?
Well, turns out Cloudflare allows you to setup a Partial (CNAME) setup that allows you to point a specific CNAME, in this case www, to their service so that you can flatten a specific CNAME like www.reclaimhosting.com in order to leverage everything we need. The amazing Chris Blankenship got that all setup yesterday in our development environment, so I think we will be able to pull the trigger on having our main site running WordPress multiregion using Cloudflare for load balancing, DDoS protection, as well as their CDN. Getting multiregion on Reclaim Hosting’s main site has been a bit of an odyssey, but like anything, keeping the faith and continually returning to the issue with a fresh perspective makes all the difference. YEAH!
Pingback: Fall with my Besties | bavatuesdays
Pingback: Doing Multiregion WordPress Stuff With Cloudflare And Reclaim Cloud – Chris Blankenship
Pingback: Flattening the DNS Curve with Cloudflare | bavatuesdays