A content delivery network (CDN) is a network of web servers distributed globally to deliver content faster. All the assets of a web application, including scripts, images, videos, stylesheets, and base HTML, must be delivered to the client server as quickly and efficiently as possible. A CDN utilizes geographically distributed Points of Presence (PoP) to bring content closer to the end user and reduce latency. A CDN’s distributed network reduces the reliance on a central server to respond to all user requests. CDN services have gained prominence over the last couple of decades and have become an integral part of the application delivery chain. CDNs are used by service providers across verticals, from eCommerce and social media to advertising and streaming services. Popular CDN providers include Akamai, Fastly, Cloudflare, Level3, MaxCDN, Limelight, and Microsoft Azure. Fine-tuning application performance involves optimizing the different components that make up the application and using a CDN is one such critical component. The role of a CDN in the application delivery chain also makes it an important factor in defining digital end-user experience. CDN performance can have a direct impact on the user experience, making CDN monitoring crucial to any monitoring strategy.
CDNs have become a critical extension of modern IT infrastructure. CDN providers typically leverage their expertise and platforms to act as partners in enabling infrastructure and helping make business-related decisions. There are many advantages to using a CDN. Investing in a CDN service will help:
"A continuous CDN monitoring strategy that specifically targets key features and deliverables of the CDN, such as network performance, web performance, CDN infrastructure, origin to edge stability, and content integrity validation is essential to achieve the digital experience goals of an organization."
An origin server hosts the application, it processes and responds to all incoming client requests. The distance between the client and the origin server adds to the time taken for the requested resource to load.
An edge server is placed on the network “edge” to quickly process requests. These servers are within a CDN at each Internet Exchange Point (IxP) in the network, which reduces transit time to a resource location.
Caching involves replicating resources and temporarily storing these files in a “cache” that can be easily accessed when requested. Scripts, HTML files, and images are usually cached to save download time and reduce latency. CDN servers store cache to optimize content delivery.
Anycast is a method of network routing, which routes traffic to a specific location via multiple paths so that each router can choose an optimal path based on distance, cost, latency, and network congestion. CDNs use Anycast to assign traffic to the closest data center; this helps manage network congestion and mitigate DDoS attacks.
A CDN is essentially a network of servers linked together sharing the same content, which, when requested, is delivered securely as fast as possible. CDN providers have servers in strategic points between different networks. These IxPs connect major Internet providers and allow access to traffic between these networks. The PoPs placed in these interconnected network highways have access to high speed data paths, which enable CDNs to deliver content faster.
The data centers maintained by CDN providers across the globe offer redundancy, making it easier to handle hardware failure or sudden surges in traffic and prevent outages due to server overload.
The above diagram illustrates how end users are routed to the nearest CDN server. In the absence of an edge server, the end user is routed to the origin, cutting down latency and the time taken to process each server request.
A CDN monitoring strategy that tracks the key features and deliverables of the CDN will ensure its services are utilized effectively. Reducing the time to detect problems and drastically improving mean time to resolution is an obvious outcome of this monitoring strategy. Many organizations are now adopting a multi-CDN approach to ensure performance around the globe. Increasingly, organizations are also utilizing geo-specific CDNs and real-time performance based CDN routing, adding greater complexity to the content delivery path. These changing conditions make CDN monitoring an indispensable tool for regularly assessing CDN performance and evaluating any new CDN vendors to fill in potential gaps.
Monitoring CDN and origin performance helps determine how much your key metrics have improved based on the presence of the CDN. Additionally, CDN monitoring offers:
A continuous CDN monitoring strategy that specifically targets key features and deliverables of the CDN, such as network performance, web performance, CDN infrastructure, origin to edge stability, and content integrity validation is essential to achieve the digital experience goals of an organization.
CDNs have sophisticated infrastructures. There are multiple interdependent components that can create bottlenecks and performance issues. As stated, CDNs add to the existing complexity of the application architecture, for example, the use of cache and optimized routing between CDN PoPs can potentially cause latency issues. Monitoring all the different processes and network paths is vital to maintaining optimal CDN performance.
When building a CDN monitoring strategy, what should you monitor and where should you start?
DNS resolution is a lengthy process with multiple server hops. Introducing a CDN to the equation can add additional points of failure. Monitoring DNS resolution with synthetic monitoring allows you to emulate a client DNS query. This makes it easier to detect and resolve DNS issues quickly, for example, misconfigured nameservers in the DNS resolution chain.
When a Managed DNS is being used, synthetic monitoring helps with analysis of performance, availability, and the ability to identify issues across the levels of DNS resolution. Monitoring DNS will also help to identify configuration issues and can serve as the first line of defense in case of a DDoS attack.
CDNs use DNS redirection methods to route requests to the appropriate edge servers so that the webpage resources load faster. There are instances where CDN nameservers are slow to respond, resulting in performance degradation. It is important to monitor such cases and the best way to do so is using synthetic monitoring for DNS and the webpage itself. The scatterplot graph below highlights DNS failures. In this scenario, the authoritative nameservers originating from the same subnet IP address fail to respond when requests come from a specific ISP.
You should also monitor DNS performance of CDN vs. origin. The chart shows a trend line of the DNS resolution time between CDN and origin and we can correlate the dip in availability with the spike in CDN DNS response time.
CDN providers identify and map optimal paths for the requested content based on the end user’s location. CDN monitoring will identify mapping anomalies and sub-optimal peering policies. It will also help verify if the end user is being served from the nearest edge server.
Consider this example of a synthetic test to monitor CDNs. Most CDNs either provide a CNAME Resource Record (e.g. *akamaiedge.com) or provide a set of A records, which you need to map the domain name to. When setting up tests to evaluate CDNs, you should ideally have two sets of tests running:
Running these synthetic monitoring tests from multiple locations will provide useful performance data that you can use to compare CDN vs origin performance from different regions.
Additionally, analyzing traceroute data will help compare and contrast the network round trip times, that is, the number of hops required to reach a server when using a CDN versus otherwise. The same use case is also relevant when comparing one CDN versus another.
With synthetic monitoring you can run tests against a domain served by a specific CDN. Overriding the DNS will allow you to test origin performance. The chart below is a comparative performance of origin vs. CDN, the webpage response (the total time to load the full page) for CDN was lower as compared to the origin.
We can also analyze different performance metrics to compare CDN performance against origin to determine optimal content mapping and routing.
Cache hit ratio compares the content requests the CDN cache is able to process successfully against the total number of requests it is handling. An efficient CDN will have a high cache hit ratio. In contrast, a higher cache miss means requests are routed back to the origin as the cache was unable to deliver the requested content.
Synthetic monitoring can provide a detailed view of CDN cache vs. CDN origin, for instance, in the chart below, you can see exactly how cache hits and cache misses measure against one another in terms of latency.
Advanced monitoring capabilities allow you to compare the origin vs. cache KPIs per city. You can use a number of metrics to compare performance, including average ping round trip times, average response, average connect, and so on.
CDN monitoring measures end-user-to-edge location latency to track performance degradation between the end user and a specific edge server or across multiple edge servers. Edge-to-origin data center latency is also important to measure especially if the enterprise has multiple origin data centers. In the chart below, we can identify the CDN origin latency trend (wait and response time correlation).
It is also important to find out the bottleneck on the page once the hosts on the page have been segregated based on first-party, CDN, third-party, etc. How much bottleneck, for example, is created by a specific zone and how does it impact the overall performance of the page? Metrics to consider include webpage response, bottleneck time, and availability.
CDNs use load balancing to distribute requests to available servers so that the traffic is routed optimally without taxing a specific server. This process is called Global Server Load Balancing (GSLB). The traffic is distributed between a set of connected servers around the world to improve reliability and reduce latency. CDN monitoring will ensure that load balancing is optimal and can trigger an alert if there is an unusual surge in traffic.
Images often account for most of the downloaded bytes on a web page and they can occupy a significant amount of visual space. As a result, optimizing images can often yield some of the largest byte savings and performance improvements for your website. The fewer the bytes a browser has to download, the lower the bandwidth consumption, allowing the resource to load faster.
CDN vendors offer image optimization as an additional feature - from simple compression to advanced optimization, the image is delivered based on end user connectivity, device, and other factors. It is important to ensure these additional services are functioning and delivering an improved end-user experience. Synthetic monitoring allows you to capture and compare metrics relevant to image optimization.
Here is an example using Akamai Image Manager. You can set up synthetic tests that will allow you performance comparison before and after optimization.
Proactive monitoring is necessary so that any potential incident is caught early and resolved quickly before it impacts the end-user experience. Synthetic monitoring provides all the insights needed to optimize and maintain consistent CDN performance. With synthetic monitoring tools you can:
Content Delivery Networks are used by organizations as part of their continuous effort to optimize application performance and deliver consistent end-user experience. Deploying a CDN can yield a variety of benefits, including improved site availability, reduced latency, optimized content delivery, and ensuring performance expectations are met when expanding to new markets.
A robust CDN monitoring strategy will allow organizations to monitor performance of their chosen CDN, from the evaluation phase through to deployment. Synthetic monitoring tools offer a range of performance metrics that will enable the detection of any potential performance issues faster. With a proactive approach to CDN monitoring, you can track CDN performance and ensure that content is being delivered efficiently with minimum latency without compromising digital experience.
Develop a killer DEM strategy.
Our one-page checklist will help you determine your monitoring strategy and data analysis essentials.