John Cox

Blogs · @wyome · Now · Shelf

Tagged cdn · everything

Interesting

Why do big websites (e.g., Facebook) use a separate domain to host their resources? : webdev

This explains why major sites like Facebook use separate domains to serve static content: sending cookies with every HTTP request wastes significant bandwidth, especially on mobile connections where upload speeds are slow relative to download speeds. The cookieless domain approach lets sites avoid transmitting cookies for requests that don't need them, while CDNs provide additional benefits like serving content from geographically closer servers and letting browsers cache popular libraries across multiple websites.

Permalink

CDNs fail, but your scripts don't have to - fallback from CDN to local jQuery - Scott Hanselman

When the ASP.NET CDN experienced a regional outage affecting the northeastern United States, the author used geographic analysis of complaint tweets to help diagnose that the problem was localized to a Boston/NYC server with a bad configuration, rather than a total CDN failure. The piece then provides practical techniques for developers to gracefully handle CDN failures by implementing fallback mechanisms—from basic JavaScript checks that load libraries locally if CDN resources fail, to built-in ASP.NET 4.5 Web Forms and MVC features that automatically serve local copies when CDN resources are unavailable. The author emphasizes that relying on external dependencies requires testing failover scenarios and monitoring CDN availability from multiple geographic locations to ensure applications remain functional when inevitable outages occur.

Permalink