Ben Schwarz
June 15, 2023
Illustrated by
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.
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:
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.
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.
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:
Not every CDN will offer the same perks, so keep these benefits in mind when researching potential providers.
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.
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.
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:
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.
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.
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.
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:
We will send you articles, tools, case studies and more, so you can become a better performance advocate.
Harry Roberts
Consultant Web Performance Engineer