Hacker News new | ask | show | jobs
by dos1 4915 days ago
I agree completely that your average website will have less uptime than the CDN. The problem isn't that the CDNs are less reliable, it's that it's VERY unlikely that your site will experience downtime at the same time as the CDN. This means your site reliability is the combination of the downtime of the CDN as well as your own.
1 comments

Yeah, but if you gracefully handle those failures with local fallbacks, then the CDN's downtime is a moot point.
See the rest of the comments in this thread about why the fallback can be painfully slow if the CDN is down. I saw your previous comment about making an ajax request with an adjusted timeout, but this is not ideal for making cross domain script requests for a number of reasons. For one, CORS needs to be enabled. Another is that you now have to create a script tag and take the responseText and jam it in there. This is going to be slower than just creating a script tag and setting the src attr.

If you are going to have a fallback, and that fallback may take seconds to activate if the CDN is down, why not just make the fallback your primary?

You can easily specify how much time a CDN will have to respond as you can see in my example in another comment: http://news.ycombinator.com/item?id=5003129