Basic Concepts of Content Delivery Network (CDN)

Now, there are some great benefits to a Content Delivery Network. You’re going to have a faster running website, you’re going to have a more secure website, and you’re going to have lower bandwidth consumptionEssentially, because you’re not loading everything on your server, you’re simply serving up the static assets, you don’t have all of this bandwidth that’s running on that main server.

What is CDN and How does it Work?

Content Delivery Networks often referred to as CDNs, are a way of delivering content online over a distributed network of servers. This is usually geographically diverse in order to provide local access to users all over the world.

Unlike traditional web hosting where content is hosted on a single server, CDNs take the content and distribute it over a huge network. Often this will be thousands of servers located all over the world. This means as requests are made for the content, the network can share the load and serve content based on the closest location. This means that the delivery of the content and makes it easier for sites to manage heavy traffic or spikes in requests.

CDNs are used largely to serve static resources like CSS and JavaScript libraries, as well as media files like images and video. Entire websites can be served through them, but it’s more common to find sites all floating specific types of content through CDNs. For example, if your site uses the popular jQuery JavaScript library, you could certainly host it yourself, but that would mean that every visitor to your site will have to request and download it from your server. However, if you used the following line of code, you can actually offload this request to Google’s Content Delivery Network of hosted JavaScript libraries.

Google's CDN Hosted JavaScript Libraries

This has the benefit of reducing the load from your server, speeding up the delivery of jQuery through Google’s CDN, and it also increases the likelihood that the resource will already be cached in case one of your visitors had visited another site that uses Google to serve jQuery. There are several types of CDNs that are available to you. Some, like Google’s hosted libraries, or the bootstrap CDN, exist to serve specific resources for sites.

Some CDNs like YouTube offer resource hosting as both a service and as a content aggregator. There are also many free or commercial CDNs that can be configured to assist with serving your entire site or specific content types. A few popular ones are Akamai, Cloudflare, Amazon’s CloudFront, EdgeCast, and Windows Azure service.

CDNs aren’t right for every site, however. Using one adds an additional layer of complexity to your site that a small site or sites with low traffic might not need. Often, instead of using an entire framework or a library, it’s better to use a minified version with only the parts that you need. Such customization is usually not available through CDNs that host those libraries. It’s especially important to consider a site’s security needs before using a CDN.

For sites where you need complete ownership and control over the site’s content, a CDN probably isn’t the best choice. CDNs are an important option to consider when deciding how content from your site should be served. In many cases, it makes sense to take advantage of the performance gains they offer as well as the reduced bandwidth to your own host.

Similar Posts:

Leave a Comment