Benefits of Using a CDN: Bringing Content Closer to Your User

Benefits of Using a CDN: Bringing Content Closer to Your User



A CDN (content delivery network) is a network of geographically distributed locations (also known as: POPs, or point of presences) setup to bring delivery of static content closer to the end user. The purpose of a CDN is to bring the content closer to the end user, which means faster and more reliable delivery. End users are served content from closest geographical POP.

Static content is usually images, video, applications, live streaming, css, html, javascript, and other files that don’t change for each user. However CDNs are becoming more powerful, and as a result more and more dynamic content is being pushed to them. With the advent of cloud computing, it is also now possible to move the entire application closer to the end user as well.

How does a CDN compare with a typical web hosting account?

With a typical hosting account your data is served from one geographical location. This can work great if all your users are near that one geographical location. However as soon as you have users in multiple geographic locations, such as different countries things change a little.

Take this example:

Your site is hosted in San Jose, USA and you have a number of end users of your site in Sydney, Australia. The content for the site has travel 12,000 kilometres to reach the end users, at the same time as traversing several networks, and experiencing a latency of 170-250ms. For every piece of content displayed on the site, it has this latency, and can result in a content heavy page taking several seconds to load. In an Akamai study recently done, 40 percent of users will leave if the page takes more than 3 seconds to load. This gets even worse if the site was hosted in Europe, where the latency to Australia is 300-400+ms.

Now if a CDN which had a presence in Sydney was used in this instance, the users would download static content via the CDN and greatly reduce the load time of the website. The latency would be 1-20ms, vs the 170-250ms the user would have experienced in the first instance. For content heavy website, this would greatly increase the load time as each piece of static content would load at 1-20ms as opposed to 170-250ms.

Benefits of Using a CDN

Akamai CDN

Image courtesy of Akamai.

Speed

With content being served closer to the user, content will load quicker, and ultimately result in an improved end user experience. This will result is happier end users, ensure you don’t lose customers due to a slow loading website, increased sales, and increased customer satisfaction.

Scalability

By using a CDN you can reduce the complexities of scaling your website as you receive more traffic, the load on your web server will be reduced, and you can delay complexities such as load balancing due to the reduced web server load. CDNs are built to handle a huge amount of traffic, so whether you are only delivering 10GB of content 10,000GB of content the setup of your site will be the same. Dealing with once off traffic spikes benefits from the same scenario, a CDN can help offload the spike in traffic.

Uptime

CDNs are designed to route traffic to POPs that are up and running, so this helps increase the uptime of your content. You’ll have copies of your content spread out geographically, and your users will be routed to the nearest copy of it that is up and running.

Protection

Due to the inherent design of CDNs, they provide a layer of protection against DDoS (distributed denial of service) attacks. They are designed to handle a large amount of traffic, and they are distributed. DDoS attacks are designed to take up all the capacity of a website, and create a bottleneck for legitimate users. With a CDN, the attack would be distributed across many locations – making it a lot harder to cause any sort of denial of service.

CloudFlare offers a free CDN-type service which requires no changes to your site, and they’ll not only help protect against DDoS attacks, but also block a raft of other common attacks by including an application firewall in their service. They are able to block common exploits and vulnerabilities on a web application layer, which increases the security on your site. At Crucial we offer this free on all our web hosting and reseller hosting plans, just login to cPanel and click on the CloudFlare icon.

Challenges with Setting Up a CDN

Setting up a CDN for the first time on your site can be a bit of a challenge, as with many of the CDNs currently available you need significant changes to the code on your site to take advantage of a CDN. In most basic terms, you’ll need to replace all the static and dynamic references to any content you’d like hosted on the CDN. Once you’ve done it the first time around, it’s not something that’s difficult to maintain.

However there are new CDN providers who are popping up that make the process extremely easy, and no coding changes made to your site at all. One of them is CloudFlare, with the plugin we provide on our hosting accounts in just a few clicks your site can be using a globally distributed CDN with over 24 POPs. Once enabled your site will automatically be distributed to POPs are your content is accessed, and no changes are required on your site. CloudFlare has a bunch of other cool features such as an application firewall and anlalytics, but best of all it’s FREE. Whether you deliver 1GB or 100TB of traffic, the service is free, they only charge you once you require advanced features such as advanced DDoS protection, SSL support, and RailGun (a feature which supports further increases in speed with specific focus on dynamic content). Since CloudFlare is actually free, it can actually save you costs with your hosting as you won’t have to pay for bandwidth usage on the CloudFlare network.

Before selecting a CDN be sure to understand where the POPs are located, and ensure it covers the broad majority of all your customers – this will your end users have snappy access to your website.

Whether you have a small basic site, or an up and coming eCommerce store you can take advantage of the various CDNs available to provide a better user experience to your customers, and provide additional benefits such as scalability, increase protection, and improved uptime.

Which CDNs have you used, and what improvements did you notice by using one?


Categories

  • I’ve used Cloudflare as well as Cloudfront and found that the benefits of a CDN depend on the type of assets and the overall weight of the site. In general the HTTP requests took significantly longer than requests to the Crucial server and since the site didn’t have many assets to download the CDN actually slowed down the overall load time. The site was tested from a number of locations. In many instances it can be enough to load content from a different subdomain to take advantage of parallel HTTP requests.