A content delivery network, or CDN, is a global network of servers. They are spread out across the world, and are responsible for a relatively large chunk of all traffic online. They server as the hosting space for static web elements, which ensures the dynamic elements of your website are served quickly, resulting in a better user experience. While using a CDN may be the answer for some websites, it’s not for others. Let’s take a closer look at why you may need one and when it’s a good idea to use one.
Benefits of a CDN
Since CDNs have servers all over the world, the idea behind it is that visitors in the USA would get their content delivered from the closest server, while a visitor in Canada would get their content delivered from a server in Canada instead of waiting for the one in the USA. That means websites load faster, since the data doesn’t have to travel as far. A copy of your website is stored on every single server in the CDN, and the server that delivers the content is always the one the visitor is closest to, so as to improve website speed.
Website speed is of course, one of the factors Google looks at when it considers where to rank your website in results. While there are many things you can do to improve your page load times, using a CDN is a quick and easy solution.
Using a CDN saves bandwidth on your host server, and keeps your website online in the event that a server goes down, or is taken down by a high volume of traffic. If one server in the network goes down, traffic is rerouted through another server, which keeps your website online. Though it may load slower because it’s not necessarily loading from the closest possible server anymore, it’s better than the website being completely down, which costs you business.
It’s hard to directly estimate the cost of downtime on a website, because not all websites are created equal. Maintenance and downtime is required occasionally, and there’s a reason many brands do it in the middle of the night.
Let’s say you have three hours of peak traffic per day where you earn $150,000 in total profit. Your traffic generates about $50,000 in profits per hour, or $833 a minute. That means if your have a 10 minute period of unexpected downtime just cost you $8,330.
Even if you’re a website that doesn’t generate revenue directly, you’re likely still relying on website traffic to get customers in the door. If your website’s down, they can’t find your address so they can come in, or they may just assume you’ve closed your doors.
Drawbacks to a CDN
CDNs can be harmful if you rely on any kind of automated testing on your website. If the network makes a change to the file, or ends up being unreliable, it can be harder to track down the problem.
If the CDN closes down, you will have to re-host your website yourself. If it doesn’t perform well, it will negatively affect your website performance.
CDNs don’t work without an an internet connection, so you cannot develop your website offline. You cannot edit the JavaScript or the CSS on the CDN, since this would change everyone else’s sites on the CDN, too. It’s a major security risk.
It’s easy to forget to update a code library if versions changes. You can use the JQuery CDN to avoid it, but it could also break tests if you have a feature in a new version that wasn’t backward compatible.
Are There Cases Where You Should Not Use a CDN?
If your website gets a lot of traffic and your assets are mission critical, using a CDN could go well, but it may not. If you’re considering it for reliability purposes, it may be worth investing in a dedicated web hosting plan. But, on the other hand, if your website is full of complicated code where there are many assets on a single page, it may be worth the performance benefit. The risk of the CDN going down isn’t as big of a deal as keeping the website moving as fast as you possibly can.
Popular CDNs
There are a number of CDNs to choose from, so I obviously cannot highlight all of them for you. Here’s a look at some of the most popular.
CloudFlare: There’s a free forever plan with limited features for people with small websites, or people who just want to try a CDN. Pricing starts at $20/month per domain. Security features are also included to protect against DDoS attacks. Plans include a shared SSL certificate, but it’s possible to upgrade to a dedicated one for just $5/month.
Amazon Cloudfront: This is the CDN from none other than Amazon. The Free Tier includes 50GB data transfer out, 2,000,000 HTTP and HTTPS Requests. From there, pricing is per GB, and based on the regional data location of the data transfer out, with pricing ranging from $0.085/GB to 0.170/GB for the first 10 TB a month. You are only required to pay for the bandwidth you use.
Stack Path – formerly MaxCDN: This service provides a robust control panel with a free shared SSL. It also comes with real-time statistics and reporting, 100% network uptime, and a 30-day money back guarantee. Pricing starts at $9/month for 100 GB of bandwidth per month. Opt for annual pricing, and you’ll get two months free.
CDN77: This CDN charges anywhere from $0.029 to $0.049 per GB, depending on your location and the amount of traffic you get. This is a pay as you go, only for what you use plan. There is no contract, and no minimum monthly usage requirement. There’s a 14 day free trial, too.
How to Choose the CDN for Your Website
If you’ve decided you want to give a CDN a shot, consider not only the price and the customer reviews, but also the analytics information they provide, as well as the performance, and APIs. With your analytics, you should be able to measure throughput and response time. Throughput is the the consistency of your connection during a user’s session, so you want it to be a good number, and response time, of course is the length of time it takes for the server to respond to the request from the browser. You need that number to be fast, too.
Analytics reports should ideally be customizable depending on the information you need for your business. It should include information about GB delivered, end-user transfer ratio, hits per second, completion ratio, delivery by data center, and other metrics to help you learn more about your visitors.
APIs allow you more flexibility with your CDN, since they can allow operations to be integrated into your automated processes, dashboards, and workflows. APIs are how CMS plugins are able to function.
Your pricing will vary based on the amount of data you’ll transfer, so obviously the more traffic you get, the more you’ll pay. Your CDN needs aren’t the same as mine, so when you talk with companies about your options, make sure you’re aware of all the different pricing structures that are available to you. Make sure you have the flexibility to change between pricing plans as needed, so your CDN can grow as you do. Can you pay as you go or will you be stuck in an annual contract? Are their any recurrent fees for additional services? What are the one-time fees?
How to Implement a CDN for Your Website
If your website uses a content management system (CMS) like WordPress, Joomla or Drupal, then it is fairly easy to integrate on your website. Once you’re signed up with the provider you want to use, you’ll identify the static content on your site that your CDN should mirror. When using a CMS, it’s usually possible to integrate through adding a plugin to your website. There are certain CDN implementations that could require you to modify your name severs and DNS records on your domain.
If you’re running a custom website or web application, implementation can be a bit more complex, so I recommend you talk to your web developer before you do anything else.
After the necessary modifications are complete, you’ll want to test them. Check for mixed content and SSL related issues. You’ll also want to make sure your caching rules are setup, so you can make sure the cache frequency with the CDN is ideal.
When you need to modify your website or add new things to it, there are likely going to be changes in HTML, JavaScript and CSS files, which means there’s a risk the CDN will continue to serve the old content, rather than the new content. As such, you must make sure you have a purging mechanism you can rely on to grab the new versions from your server. You can do this one of two ways: either with the CDN’s user interface, or using an API call with a plugin from your CMS. Most of the plugins built for CDNs already have this function so it is taken care of for you.
Is a CDN the Answer?
A CDN is just one way you can boost your page load time. However, the best CDN for you will depend on exactly what you need. You need your CDN to have servers where your visitors are, to get the best possible performance, so if you notice a lot of your traffic comes from Israel, and there are no servers there – then you need to move to a different provider. But beyond that, you also need an affordable service that is easy to integrate and customize.
What’s your experience with CDNs? Share in the comments below.