Having a backup, DNSME, and Cloudflare on primary

Based on the above article, I’ve set up my secondary server (on A2 hosting) with DNSME monitoring the primary (Bluehost VPS) on one of my sites. However, that site is being attacked by DDOS, which another site of mine withstands very well since it’s on Cloudflare. Now, I want to have both sites on Cloudflare while still being able to switch to a secondary site quickly if my primary, Bluehost VPS server goes down, which is what DNSME provides me.

However, from what I could see, I can’t use both services (Cloudflare and DNSME) since I could only set the nameservers to either one or the other.

How can I have BOTH Cloudflare’s DDOS protection AND DNSME’s switching service? Is that even possible?

Have you tried looking at CF’s Load Balancing offer? It does basically the same service as you describe DNSME.

Wow, I had no idea Cloudflare does this! I need to look into this seriously. Thanks!

1 Like

No worries, it’s not free, but not too bad! You could probably and theoretically do it with a Worker, but that would be a little more complicated, though probably less expensive.

And if you don’t want to spend money with Cloudflare (I mean hey, I won’t complain if you really want to by any stretch) you can also call our API to change the origin IP address from server A to server B if you have something else monitoring for failover:

Our LB is obviously a bit more robust, but there are certainly scenarios where simply switching the origin makes sense.

Yeah, it would probably not work if he expects a catastrophic failure of the server, unless the check is performed by the secondary, but that isn’t guaranteed either…

This topic was automatically closed after 14 days. New replies are no longer allowed.