What is a CDN? An Unbiased Guide to Content Delivery Networks

Ben Schwarz

Ben Schwarz

June 15, 2023

Illustrated by

 Jeffrey Phillips

A content delivery network (CDN) is one of the best ways to improve the performance and reliability of your site. It can help you boost page speed, fend off denial of service attacks, and optimise your content for faster delivery.

There is a lot to choose from if you’re in the market for a CDN. Picking the right one for your website is a major decision, so you want to do your research. However, there’s one problem—all of the top results for searches about CDNs pull up guides from companies selling CDNs. How can you trust a blog post essentially written by a salesperson?

The good news is we don’t sell CDNs, but as experts in web performance, we certainly know a thing or two about them.

To help you out, we’ve written this guide so that you can make an informed decision when choosing a CDN. We’ll outline what a CDN is, why your site would benefit from one, and how to pick and test it. With this resource, you can find a CDN that suits your site’s needs perfectly.

What is a CDN?

A CDN is a network of globally-distributed servers that can host your content and deliver it quickly to your visitors. CDNs help support your main hosting server by reducing latency, improving reliability, and even optimising your content for quicker delivery.

Think of your website as a global package delivery company. Every day, people from all over the world want to get website content from you, and they want it delivered quickly. If you solely rely on a single massive warehouse for shipping that web content, you open yourself up to a whole host of problems, like:

  • Your warehouse could be overwhelmed on busy days.
  • A single failure could shut down the entire network.
  • Packages will take longer for far away customers.

A CDN is like having smaller, local warehouses placed worldwide. Local warehouses receive content from your central warehouse (host server) and store it until your visitors order the content. This way, we can deliver content reliably and quickly as CDN server locations are all over the place, and if one goes down, another can pick up the slack.

How do CDNs work?

CDNs can deliver content for you more quickly because they own servers in strategic locations around the globe. To understand why a global network of servers is beneficial, consider how data moves through the Internet without CDNs.

To get data from a server in Denver to a home in New Zealand, the data would need to pass through major hubs in San Francisco, Sydney, and Auckland before being routed through a local New Zealand internet service provider (ISP). All this routing takes time. If a particular path is damaged or busy, it might take longer as the traffic needs to be routed through another path.

A CDN gets around these problems by storing your content ahead of time all around the world. So instead of bringing data all the way from Denver when a request is made, a CDN would store that data on its server in Sydney to get to New Zealand more quickly.

What are the benefits of CDNs?

CDNs don’t just help you speed up content delivery times, reduce latency, and boost Time to First Byte (TTFB). They can also benefit you by:

  • Reducing the load on your origin server: Even powerful servers can only do so much. If you have a big sale, all the traffic could overwhelm your origin server quickly. CDNs distribute that traffic across many servers, so no one server gets overloaded.
  • Shrinking file sizes: Most CDNs will automatically optimise your content files to transmit that data to your site visitors more quickly.
  • Improving securityDDoS attacks attempt to shut down sites by overwhelming servers with massive bot traffic. CDNs help mitigate this threat—if one server goes down, others can take over.
  • Optimising images and videos: Specialised CDNs also make hosting and delivering different kinds of content easier. These CDNs will use strategies like automatically changing file types to make content delivery as quick and reliable as possible.

Not every CDN will offer the same perks, so keep these benefits in mind when researching potential providers.

What to consider when choosing a CDN

There are many CDN providers—from giants like Amazon Web Services (AWS) or Google Cloud to niche freemium offerings. Each CDN has its pros and cons, which can be overwhelming if you’re new to this technology and web performance.

Evaluate each CDN based on these variables to find one that is perfect for you.

  • Price: Some CDNs are free, while others cost a modest fee based on your traffic numbers. Unless you cannot pay, a paid CDN is almost always the best choice.
  • Server locations: Companies with geographically distributed audiences benefit most from CDNs. If you’re a local business serving Melbourne residents, a CDN server in London won’t help you. Make sure to pick a CDN service with server locations near your customers.
  • Intuitive interface: CDNs aren’t just “set it and forget it.” You’ll want to be able to optimise CDN settings or purge stale content easily. Having an excellent interface to work with makes this a lot easier.
  • Level of customer support: No CDN is perfect, and there will likely be a time when you need to talk to customer support to troubleshoot an issue. Investing in a CDN with a proven track record of good, timely customer service is well worth the cost—especially if you don’t have someone on your team familiar with servers and CDNs.
  • Extra features: As mentioned earlier, some CDNs specifically cater to brands that have niche website needs. An Image CDN would appeal to particularly image-heavy websites, or a Video CDN would be suitable for sites that rely on video streaming. If your site has specific needs, see if there’s a CDN out there that caters specifically to you.

There’s no “best” CDN service—your tool choice depends on your business’s unique site needs. Use the above criteria to find a couple of good contenders worthy of your site.

How to introduce a new CDN

Adding a CDN to your site is more than just a basic installation. After you’ve run through the CDN’s setup process, you’ll want to ensure it’s working correctly. Be sure to set aside the time to audit your site in a controlled environment before publishing it to customers.

This includes checking that:

  • All pages load properly, including all images, video and other media.
  • All third-party scripts are loading and functioning as expected.
  • The browser developer console is free of errors. Look for CORS issues, requests that failed, or other error messages.

Once you’ve established that the CDN is functioning properly, it’s time to make sure that it’s leading to a noticeable difference in performance on your site.

How to test CDN performance

Although a CDN shouldn’t ever hurt performance, some may not make the noticeable differences you were hoping for. Test your CDN’s impact by checking web traffic speeds with the CDN activated and deactivated.

Specifically, you’ll want to measure Time to First Byte (TTFB) and Largest Contentful Paint (LCP). TTFB measures how long it takes for servers to send over the first byte of data, while LCP measures how long it takes for the most prominent element on your page to load. A good CDN should speed up both metrics from various locations. This way, you know that the CDN is doing its job for site visitors across the globe and not just in your backyard.

With some planning, you can test the impact of your CDN on TTFB and LCP using a simple, free tester like our Core Web Vitals Test or Google’s Pagespeed Insights. With these tools, you can get a baseline test before you activate the CDN and then test again a month or so after activating your CDN. You’ll need to wait a month because these tools rely on Google’s CRuX data, a data set taken from the Google Chrome audience that updates monthly. Unfortunately, you won’t be able to test specific locations with these tools.

Free tool
Core Web Vitals report for calibreapp.com domain

Check if your site passes the Core Web Vitals assessment in one click.

If you want more granular testing across locations, use the Calibre testing platform. It lets you test sites as often as you like to see the immediate impacts of your CDN. You can also test page speeds from specific locations to determine whether your CDN is genuinely making a global impact.

Learn more about improving your site speed and performance

CDNs are just one part of providing a stellar experience for your site visitors. To reduce bounces and improve conversion rates, you’ll want to invest more time and effort into optimising your site performance. Take a look at the resources below to get started:

Ben Schwarz

Ben Schwarz

Ben is the Founder and CEO of Calibre. He uses his experience in far-reaching Open Source projects and web standards to build tools for a better, more accessible web. Find him on Mastodon or LinkedIn.

Get the latest performance resources, every two weeks

We will send you articles, tools, case studies and more, so you can become a better performance advocate.

This newsletter is easily the best performance publication we have.

Harry Roberts

Harry Roberts

Consultant Web Performance Engineer