« Back to The Ecommerce Authority

An Introduction to Content Delivery Networks (And Why You Should Care)

Heard of a CDN, but not exactly sure what it really means? Read this article to get a quick and easy crash course on the benefits of content delivery networks.

CDN blog An Introduction to Content Delivery Networks (And Why You Should Care)

Picture this: It’s 400 B.C. in the height of the Roman Republic.  You’re walking along the aqueduct carrying a grocery list etched in your wife’s neat chiselhand, determined not to forget the eggs this time. You enter the market and collect your things, but as you walk up to the checkout, you discover that you left all your cash in another robe.  No problem, you can just walk over to a nearby ATM and extract some of that hard-earned denarii, right?  Only, there’s no ATM.   You fall to your knees, cursing Zeus and Poseidon that there isn’t some system of distributing information like account balances, or better still, the very contents of those accounts! And that, class, is where the beauty of Content Delivery Networks comes in.

 

What are CDNs?

You may have heard of Content Delivery Networks (CDNs) as a tool that webmasters use to speed up their sites. And while the digital workings of getting a CDN architected, developed and deployed is fairly technical, the principles are extremely simple. In fact, it’s the same principle behind why you go to a grocery store instead of a farm: the grocer is just plain closer. The food and produce isn’t made there, but if you had to drive 50 miles to get fresh milk, that favorite morning bowl of cereal would be a lot harder to come by.

When you type in a web address like www.google.com, your browser is actually asking Google’s servers to send back all of the resources needed to display that page. That includes things like the code to position search results, to manage what happens when you run a new query and whatever the latest flavor of their logo is. All of those things have to be downloaded over wires that can run for quite a long distance. A CDN is a transparent way to physically move many of the resources of a webpage closer to your computer.

For web developers (and Volusion merchants!) who choose to use a CDN, instead of just chucking every file in one central folder on the server, certain files (more on that in a minute) can instead be placed on their content delivery network. It may seem like you’re just putting those files in a different bin, but the CDN automatically distributes copies of those resources to specialized servers located in many geographically distinct regions. Later, when that page’s URL is typed into a browser, depending on where you are physically in the world, the closest server in the CDN is the one that actually feeds those resources to your browser.  By shortening the distance the various components of the webpage have to travel, content delivery networks help to lower the time it takes to start seeing that page, while reducing the opportunity for transmission errors to be introduced.  In the image below, the left half shows the simple configuration of serving all your web files from one place, while the right shows how CDNs can bring portions of those files closer to their ultimate recipients.

CDN Diagram An Introduction to Content Delivery Networks (And Why You Should Care)

Image source: Wikipedia

 


What do you mean by “certain files?”

Like any piece of technology, there’s a right and a wrong way to use CDNs.  They’re most useful for delivering static (unlikely to change) pieces of content, such as images, style sheets (CSS files) and scripts (JavaScript files). Part of the specialized nature of the geographically distributed CDN servers is to make them really good at quickly handing out content, but at the cost of giving them no ability to process that content first. Non-static files that require a server to make some decisions—like logging a user in—won’t work properly on a CDN for this reason.

Additionally, CDNs only solve part of the problem when it comes to actually “getting” to a webpage; they make the trip to the server shorter. But if you’re sitting pretty on an old dial-up modem, or in a place where the WIFI coverage is spotty, it’s still going to take a while to get those files from the server. Likewise, CDNs don’t magically compress the size of a file any more than a regular server would, so sticking a 5 megabyte video clip of your sister staring at her cat for three hours won’t make it magically download faster just because it’s on a CDN. This means that it’s still a good practice to keep files as small as possible, to optimize images for the web using a program like Photoshop and to be aware of what a CDN can and can’t do.

 

Extra perks

There are a number of secondary benefits to using a CDN that might not be obvious upon first glance.  All modern browsers impose a limit on the number of resources (images, scripts) which can be downloaded concurrently from the same domain in order to prevent a bottleneck on slow connections.  Nowadays, however, connection speeds are such that these artificial limits usually hinder performance by preventing resources from being downloaded more expediently. These limits can be circumvented by placing some of those resources on a different domain, such as a CDN. If your browser limits concurrent connections to only two, it would be possible to download two non-static files from your main server and two static images from your CDN at the same time—a 200% boost.

Another benefit to placing static content on your CDN is caching. Whenever you visit a webpage, the resources it downloads are stored locally on your machine for a time (unless you’ve disabled caching). This allows a browser to check to see if it already has a copy of some resource requested by a webpage, loading it from the local hard drive instead of wasting resources on downloading another copy. This is like getting ready to head to the grocery store, only to remember at the last minute that you have a spare bag of Cheetos stashed out-of-sight at the back of the pantry. CDNs are especially good at telling browsers whether their files have been changed since the last time your browser downloaded them, and if they haven’t, the download can be safely skipped and the resource loaded locally.

 

Wrapping it all up

Content delivery networks are a way to minimize the travel time between your browser and the page resources needed to show you a site. From a real-world perspective, the Romans themselves had content delivery networks for their water in the form of their aqueducts, and the markets for their food where you earned a lightning bolt. Every Volusion merchant has access to our CDN by default, and setting it up is a simple process. Taking advantage of this technology can help your customers get around your site up to 60% faster, so we hope you’ll take the time to set this up!

 An Introduction to Content Delivery Networks (And Why You Should Care)

About

Michael Speed Elder is a Web Developer for Volusion, specializing in the front-end JavaScript, CSS and HTML used by the browser to make online experiences awesome. Between working in the digital ad space and now in ecommerce, Michael hasn't met a problem he couldn't solve with a webpage. On top of his usual responsibilities around the office, he's also in charge of keeping the ping pong tables busy, captaining the Nerf Marksmanship Team and being just a little too tall.

6 Responses to “An Introduction to Content Delivery Networks (And Why You Should Care)”

  1. Allison

    Is it possible to use the Volusion CDN for content other than product images, such as template scripts, buttons, heading/manufacturer images? Is there a CDN-enabled folder that I can FTP into?

    Reply
    • Gracelyn Tan

      Hi Allison. Not currently. Our apologies for any inconvenience that may cause. Please let us know if we can help out in any other way.

      Reply
  2. barb

    AAA sorry totally lost…:( Don’t understand the benefit to me and my business.? Didn’t think i was still a newbie but i guess i am, this all went over my head..:(

    Reply
    • Michael Elder

      Don’t sweat it a minute; there’s so much stuff to building a website well that it can be a little daunting, and more than a little difficult to keep straight. A content delivery network can speed up the overall load time of your site by allowing a visitor to download certain parts much more quickly. If you follow the link to our guidelines for setup, all of your product images will be imported to the CDN automatically.

      Reply

Leave a Reply