Deliver Content to End Users Anytime, Anywhere with a Foolproof CDN Monitoring Strategy
Developing a good CDN strategy is the difference between quickly delivering content to user and webpages with long latency times and few visitors.
Join the DZone community and get the full member experience.Join For Free
the primary purpose of a content delivery network (cdn) is to get content to users faster. this has never been more important in the era where a response taking more than a couple of seconds can lead to a user abandoning your web site. for example, we all know that round trip latency can greatly impact overall page response time. the distance between los angeles and washington dc is 2,669 miles or 4,296 km. let's say the theoretical minimum for roundtrip latency is 28ms. but that's theory. in reality, it takes between 80-100ms. this latency is included in each and every round trip made for content on your website. cdns help reduce this by delivering content from points of presence closer to the end user than the origin web server, and ensure your users stay on your site.
before deploying a cdn most organizations go through a rigorous metrics-based evaluation to help them assess how much faster the cdn is than their origin in key geographical markets. during the evaluation customers will monitor cdn and origin performance to determine how much key metrics improve, but post deployment ongoing cdn monitoring often stops. deploying a cdn should mark just the beginning of a cdn monitoring strategy.
it is up to you, the consumer of the cdn service, to ensure that promises regarding performance obtained during the evaluation continue through delivery. 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 for their effective utilization. being able to quickly detect and fix performance issues at the edge or origin is a key requirement to ensuring customer satisfaction and a low mean time to resolve.
many organizations today are using multiple cdn providers. monitoring your cdn can help you implement real-time performance-based cdn routing or identify geographic areas that may be better suited to a second cdn. the ability to benchmark your cdn's performance variations over time helps identify performance patterns and enables you to hold the cdn accountable to the agreed upon sla.
cdn monitoring basics
implementing a cdn introduces a dynamic component into your it infrastructure, with multiple moving parts and potential points of failure. each of these components should be included in a cdn monitoring strategy.
last-mile and mobile testing
the last-mile network is a critical component for the optimal functioning of a cdn. mapping of an end user to the most optimal point-of-presence (pop) is a science in itself; taking into consideration the isps, the geo locations, and historical data. all of this is to ensure end users get the same performance from any device, from anywhere. monitoring from only backbone or cloud nodes will not show you how your end users are experiencing your application. synthetic monitors from last-mile and mobile locations combined with real user monitoring will give you a true picture of your application as delivered via the cdn.
most cdns provide value-added services such as front-end optimization or http/2 support to further improve application performance. optimization features such as caching, compression, image optimizations, and redirection offloads can reduce the size of objects and number of requests, thereby reducing the number of roundtrips needed to deliver content. monitoring these features provides it teams the ability to identify performance bottlenecks and quickly resolve performance issues.
cdn infrastructures are complex. in most request-response cycles, a significant time is spent within a cdn's infrastructure. usage of cache-hierarchies and optimized routing between their own pops have all led to further added complexities and with them, latency. hence, monitoring how each aspect of the cdn's own infrastructure and routing impacts the delivery of your content becomes a key aspect of any cdn monitoring strategy.
monitoring performance of objects retrieved directly from the origin server either by the cdn or the end user cannot be overlooked in your cdn monitoring strategy. if the origin is producing errors, unavailable, or is introducing latency, this can cascade through the cdn and ultimately the end-user experience is impacted. when cdn servers have to fetch contents from these origin servers, issues with network connectivity, latency, and origin capacity can become a bottleneck. the need to monitor the performance of your origin server infrastructure is essential to separate issues of cdns from problematic origin infrastructure.
measuring success with cdn monitoring
there are a variety of reasons why your company chooses to deploy a cdn. below are a some of the top reasons why cdns are used and tips on what to include in your cdn monitoring strategy to measure the success:
one of the fundamental use cases of a cdn is to improve the availability of web assets. cdns provide multiple ways to achieve higher availability when compared against an origin infrastructure. this is accomplished through features such as serving cached or stale content when origin is unreachable or unavailable; long term caching strategies ensure the need to reach the origin is reduced. modern cdns also provide ways to enforce failover logics at their edge servers; based on response from stipulated origin, backup or secondary origins can be invoked.
to measure improvement in availability with cdn monitoring:
- run high-frequency object tests from last mile isps.
- schedule tests against both the cdn and the origin server.
cdns bring web content closer to the end user through their geographically distributed network infrastructure. leveraging a similarly distributed dns system, cdns also "move" the dns resolution process closer to the "edge". this reduces network latencies and cascades into improved response times for an end-user.
another key component to cdns is their mapping technologies and peering agreements. some cdns use proprietary mapping algorithms while some leverage the anycast technology to map their end users to an optimal edge server. the common idea behind any method is to identify an end user based on the connecting isp and route them in the best manner possible.
to measure improvement in network proximity with cdn monitoring:
- test across a broad range of geographies and isps.
- use traceroute tests to compare and contrast the network roundtrips with and without the cdn.
- view the cumulative effect a lower round trip time has on overall page load time with a single object http test. this eliminates requests from third parties.
- test across multiple isps in the same geography to identify peering and mapping anomalies.
content proximity and optimization
cdns started off as simple distributed reverse proxies, with the goal of offloading origin traffic by caching content closer to the user. caching static content is still a well-used feature, even decades after cdns' inception. the impact between a cache-hit versus a cache-miss could translate into lost revenue or a frustrated end user.
apart from optimizing and caching of static contents, cdns can also accelerate the delivery of dynamic content. user-generated content, logged-in pages, confidential and private information, and financial details are good examples of dynamic content. optimizing the path to origin becomes a critical requirement for this acceleration. providing conditional caching, providing "edge" server hierarchies, and offloading ssl handshake all contribute to improving performance for an end user.
to measure improvement in content proximity and optimization with cdn monitoring:
- collect information on which edge server responded to the request, cache hits, cache misses, and other metrics related to the delivery of content.
- conduct a/b tests to analyze the impact of front end optimization on page completion. identify which percentiles see the greatest improvements with optimizations.
- run what-if scenarios to test different features and use cases out.
- classify data based on content delivered from the cdn and content delivered elsewhere.
- collect timings on critical resources such as hero images.
benchmark emerging technology
cdns work as an extended arm of a company's infrastructure. it's imperative for cdns to support emerging technologies and protocols in a scalable way. a good example of this would be the implementation of the http/2 protocol. the successful adoption of this was driven in large part to cdns supporting this protocol.
an advantage of cdns supporting emerging technologies is the reduction in capital expenditure and a reduction in it operations. the cdns offload this implementation over to their platform, providing customers simple switches to turn on these technologies for their customers.
to benchmark emerging technology, configure tests for the technologies being used including http/2 and ipv6.
evaluate market expansion
a cdn makes it easier to break into emerging or new markets without significant capital expenditure. a significant use case of this is china. china represents a tremendous opportunity for online companies who can deliver a superior experience behind the "great firewall." but establishing a presence in china comes with additional challenges.
to evaluate market expansion with cdn monitoring:
- test from backbone and last-mile providers in the desired geography.
- measure performance from 2g and 3g mobile providers.
deploying a cdn and creating a comprehensive cdn monitoring strategy can offer a variety of benefits to your organization including increased site availability, improved response times, optimized content, and validation that performance expectations are met in new markets.
Published at DZone with permission of Dawn Parzych, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.