4 Reasons You Should Stop Using a Content Delivery Network

A content delivery network, or CDN, has long been a favorite tool of web developers. While it offered some advantages in the past, advances in technology and concerns over security — among other reasons — have made use of a content delivery network more problematic than it’s worth these days.

CDNs Offer a Few Advantages

The content delivery network gained favor with developers because of its ability to speed up website loading. It accomplishes this by offloading some of the resources to this network and caching them for the user. Because the CDN houses common scripts used by a lot of sites, it’s likely you already have a copy in your browser, so there’s no need to download it again.

Web developers focused on increasing site performance tout the office CDN as an effective resource for boosting load speeds. For example, if you are running Bootstrap 5.0.2 on your site, you can offload those resources to a CDN, saving your users the load time for a 56KB Javascript file and a 153 KB CSS file. If your download speed is in the vicinity of the national average, 40 Mbit/s, this would save .04 seconds on your page load. The difference is more significant on mobile devices: with a national average of 20.4 Mbit/s, this would save over .08 seconds per page load.

Faster load speeds aside, many CDNs also offer built-in analytics that can provide users with statistics such as bandwidth usage, cache, and content zone breakdowns.

Sounds great, right? Not so fast: CDNs have some serious drawbacks that counteract their usefulness.

Arguments Against Using a Content Delivery Network

Sure, a content delivery network can make your data faster and more reliable. But more and more these days, the cons outweigh the pros. Here’s why:

  • Outdated Technology. Technology is constantly evolving and CDNs are no different. The truth is, modern browsers are no longer structured in a way that makes content delivery networks beneficial. Cached content is no longer shared between domains, making one of the biggest benefits of using an office CDN null and void. If two separate sites use the same resource on the same CDN, the end user will still need to download both.
  • Security Flaws. Those who advocate for CDNs say they provide security against Distributed Denial of Service (DDoS) attacks. While it’s true that they can redirect network traffic to help prevent outages, remember that CDNs are cached versions of your origin server. If that falls prey to a DDoS attack, the data not yet cached to your CDN may be lost. And with CDNs, there is external communication; your site information is passed in the header of the request for that resource to the CDN, opening your site to the opportunity for malicious activity. By keeping your resources local, you eliminate any unnecessary risk.
  • Extra Cog. A CDN represents an extra cog in the wheel; it’s one or more additional requests leaving your site. If your site is dependent on that functionality and the CDN goes down, your site is affected beyond your control. Resources exist on your site for a reason, and letting others control yours leads to additional issues. Consider the recent outage on the Cloudflare content delivery network, one of the largest and most popular. It went offline for a minimum of 1.5 hours on June 21, 2022, which caused all associated sites to have issues with their resources during that time.
  • Cache No Longer as Important. When modern browsers were updated to HTTP/2, parallel streams were introduced. Instead of being limited to downloading just a couple of items at a time, like a hero image and CSS file, you can now run many streams simultaneously. You no longer have to wait for that high-definition hero banner to finish downloading before your off-canvas menu will work. Is cache still important? Yes. But not having a resource cache has significantly less impact on your load speed.

CDN Alternatives

Fortunately, there are plenty of alternatives to using a content delivery network. Use resources that are local to your web server. Instead of hosting and linking to the CDN, have a copy of that resource available on your site and link to it there. This reduces your risk considerably and makes your site more stable. You can also update the cache settings on your site to get the same outcome a CDN would have provided.

If you would like more information or ideas on reducing your site’s dependency on CDNs, reach out to Foremost Media for a free consultation!