Hacker News new | ask | show | jobs
by user5994461 2163 days ago
>>> Spread your name servers, and use short-TTL weighted CNAMEs, defaulting to say, 99% Cloudflare, 1% your internal load balancer.

Which can't be done because it invalids the point of using CloudFlare!

CloudFlare is used to protect your site from DDoS attacks and ransoms. It has to hide the IPs of the servers otherwise attackers will DDoS the servers directly, bypassing CloudFlare.

3 comments

Then you use > 1 CDN and switch traffic away from the faulty one. Also, if you serve a very large amount (as in different, say tens of thousands of different images) of data, 1 % of traffic is not enough to keep the other CDN caches warm.

I know of at least one site that works this way which has allowed them to weather CDN outages.

This isn’t an uncommon setup for large corporations.
You can use cloudfront or another cloud WAF service as your alt DNS. I think Akamai has a solid one if you can afford it.
You can also use CloudFlare for caching, or as a WAF, which you might not care about during a relatively short CloudFlare outage.