WP The Essential CDN Guide: How Caching Works

Archive

Tips From The Essential CDN Guide: How Caching Works

Tips From The Essential CDN Guide: How Caching Works

Anyone looking into optimal global website performance will eventually come across the term, content delivery network (CDN). Just what is a CDN and how can one work for you? Whether you’re using a CDN or are shopping around for one, we’ve put together The Essential CDN Guide, which covers the technologies, aspects and benefits for you to use as you evaluate your web optimization strategy.

The Problem

The following brief scenario illustrates what a CDN is all about.

In visiting a well-known site such as Overstock.com, rarely would your HTTP request get routed directly to its origin servers at its Salt Lake City headquarters. And without a CDN operating behind the scenes, your request would likely be bounced from location to location before finally reaching their home page.

For example, a web query from upstate New York to Peugeot.com might take as many as 19 hops, each adding several milliseconds before Peugeot’s home page is fully rendered in your browser. Such a lag is called latency.

In relation to any online shopping site, CIO.com quotes Gabriel A. Mays, founder of Just Add Content, as stating, “Your biggest threat isn’t a competitor, it’s the back button. If your website loads too slowly, customers won’t wait around. They’ll go elsewhere.”

And in How One Second Could Cost Amazon 16 Billion Sales, Fast Company tells us that, “Four in 10 Americans give up accessing a mobile shopping site that won’t load in just three seconds (which is roughly the time taken to read to the period at the end of this sentence). Crazy, given that shopping sites tend to have to be image-centric, and thus may take longer to load.”

The Essential CDN Guide says studies show that a second-long delay causes a 7 percent drop in conversions, an 11 percent drop in page views and a 16 percent drop in customer satisfaction.

The Solution

The solution to latency is content caching.

Using our Overstock.com example, if all of the merchandise sold through its website was in a single warehouse in Utah, there would be a several day delay while your new BBQ grill makes its way to you. Distribution centers strategically located around the country solve that problem.

Similarly, having the same content—that comprises your entire website—available at several strategic locations around the globe significantly reduces latency for users everywhere. A relatively local data center brings your website content closer to visitors, ensuring the best possible user experience.

Such locations are referred to as points of presence, or PoPs, each having its own bank of caching servers. An Overstock shopper located in the UK visits one of that company’s cached servers in London, its PoP being nearer to his location.

Beyond performance, having your content hosted at multiple PoPs also ensures availability for users. Here a CDN provider offers a service level agreement (SLA) attesting to uptime, even during massive peaks in users traffic, power outages, hardware issues, network problems and other factors.

Latency a Universal Problem for Websites

E-commerce isn’t the only business segment to be concerned about latency. For online gaming sites, even the slightest of delays can have unwanted consequences for players. Other organizations that can benefit include:

  • Advertising
  • Healthcare
  • Media and entertainment
  • Higher education
  • Mobile
  • Government

Only those organizations running a strictly localized website, where the majority of your users are located in the same region as your hosting, have little use for a CDN for caching. In this situation, performance could actually be degraded.

How Caching Works

PoPs or proxy cache servers are the foundation of a CDN’s network data centers. PoPs are selected based on traffic patterns of individual regions and strategically positioned around the globe. The density of PoPs depends on how much traffic is routed in a particular area.

Cache servers provide local users with accelerated access to cached files by acting as a repository for website content. The closer a cache server is to the end user, the shorter the connection time needed transmit that data.

To find out more about caching algorithms, writing rules and cache headers, please check out the CDN Caching chapter in the CDN Guide.

The Essential CDN Guide covers CDN architecture, caching, front end optimization, route optimization and other CDN technologies. We will be adding chapters on CDN security, multi-CDNs, SEO and how to choose a CDN.

Have questions about CDNs, site optimization or other performance topics? Write in a comment below.