Introduction
A content delivery network (CDN) refers to a geographically distributed group of servers that work together to provide fast delivery of internet content. By replicating the content on servers that are closer to the end-users, CDNs can deliver the content much more quickly than if every request had to go to a single server.
A CDN allows for the quick transfer of assets needed for loading internet content including HTML pages, JavaScript files, stylesheets, images, and videos. The popularity of CDN services continues to grow, and today most web traffic is served through CDNs.
Although the benefits of using a CDN vary depending on the size and needs of an internet property, the primary benefit is to improving website performance. A well-configured CDN will help by speeding up the page load times, while a poorly configured CDN may lead to bad performance.
This article explains how you can set up a test to understand whether your CDN is working as expected by comparing it against the origin.
CDN vs Origin Test Configuration
You can easily set up CDN vs Origin test by following the steps below.
Insight Indicator Configuration
This configuration uses Insight Indicators to capture custom metrics from the response headers. Before setting up the test, follow these steps to configure Indicators capturing Edge Server Timing and Origin Server Timing.
- Navigate to Settings > Insight
- Add an Indicator with the following settings:
- Name: Edge Server Timing
- Token: est
- Status: Active
- HTTP Section: Headers
- Format: num=(.*)
- Content Type: Number
- Add another Indicator with the following settings:
- Name: Origin Server Timing
- Token: ost
- Status: Active
- HTTP Section: Headers
- Format: num=(.*)
- Content Type: Number
Your completed Indicator configuration should look like this:

Test Configuration
- Navigate to Control Center > Tests and create a new test.
- Select Script Template and then select CDN vs Origin (under Custom). This sets up an API test pre-configured with a script designed to capture the CDN and Origin details.
- Input a Name for this test
- Complete the Template Fields (below the script)
- URL (the URL that any user would navigate to. This serves the content from the CDN)
- Origin Domain Name or IP (The origin that the CDN replicates)

- Complete any other desired test settings and then Save.
Dashboard Creation
You can visualize the CDN vs Origin test results in a Custom Dashboard by following the steps below.
- Create a new dashboard, add a widget, and then go to Custom Visualizations,select CDN vs Origin, and click Continue

- Complete the required widget properties before saving the dashboard:
- Name: a name for this widget
- Filter: Select Test and then input the name of the test you set up earlier
- Metrics: Add the following metrics in the Metrics field:
- Connect (ms)
- SSL (ms)
- Wait (ms)
- Load (ms)
- Server Response (ms)
- #Runs
- Edge Server Timing
- Origin Server Timing
Below is an example of this custom dashboard. It comprises three different visualizations:
- The first visualization breaks down all the variables and highlights different metrics involved in fetching the page via CDN vs directly hitting the Origin server.
- The second visualization shows CDN and Origin server response time plotted over a period.
- The last visualization is a bar chart that shows Wait Time for CDN vs Origin servers by country.
