If you are a Magento or WordPress website owner you have undoubtedly heard about CDNs (Content Delivery Networks) as an essential ingredient in your site’s load speed and overall performance. However, you probably were too focused on creating content and running your web business to pay much attention to what may seem to be yet another techie “upsell”. In fact, CDNs are very useful tools to help your website grow. In this post we’ll outline some of the top reasons to use a CDN.
How a CDN works
Before we delve into the advantages of using a CDN, we’ll first give a very general outline of how a CDN works. In essence, a CDN is a system of caching servers specifically designed for maximum speed. When your site is configured to use a CDN, the files on your site are replicated on these caching servers. When another computer visits your site, instead of connecting directly to your web hosting server, it connects to the CDN caching server closest to them to retrieve your site’s files. You can think of this in terms of ordering a product from an online retailer, where the server can be thought of as a distribution warehouse. When you buy a pair of shoes from a company with a single warehouse (let’s say Los Angeles), no matter where you live (let’s say New York) the shoes must be shipped from there and can take a long time to reach you. A company that utilizes multiple distribution centers can get the shoes to your house much faster because a) the distribution center is located in Boston and b) the distribution center exists solely to ship the shoes to you as quickly as possible.
CDNs Significantly Decrease Page Load Times
One of the most obvious advantages to using a CDN is that it will greatly reduce page load time. This is due to a variety of reasons, one of which is the distance from the user to the site as discussed in the shoe example in the preceding section. Even if physical distance is not a factor for the scenario, virtual distance may come into play. This is the number of hops it takes to get from one computer to another, which is based on network topology. To illustrate this, let’s say for example you live in New York and are trying to get to Chicago as quickly as possible. Traditionally you have always taken a train that only has one route from New York to Chicago, and were always at the mercy of conditions on the track that may slow down your progress. A CDN is like being able to drive from New York to Chicago using a variety of routes depending on construction, traffic, weather, etc ensuring the fastest possible arrival time.
In addition to the advantages of physical and virtual distance, the hardware and compression capabilities of CDN servers will almost certainly out-perform any standard web hosting server. CDNs are configured to use an enormous amount of short-term RAM, which in turn is much faster than the typical mechanical hard drives in use on most typical web hosting servers. You can think of a traditional server like an oven, which can have an almost limitless number of purposes, but you have to tailor each recipe individually. Baking bread for example can be quite a laborious affair with a traditional oven. A CDN server is like a bread machine, which can only make one item but does it extremely efficiently and can save a great deal of effort.
Additionally, CDNs take advantage of caching technology to further compress the site’s assets and increase speed. For example, if you have a product page on your site that seldom changes, a CDN will cache the entire page and compress it. When a visitor views that product, instead of asking for each individual item on the page one at a time (i.e. the dozens of images, icons, scripts, and files that comprise a typical modern web page), the CDN will deliver the entire stored page at once, vastly reducing the number of request made to the server and decreasing page load time substantially. In this sense, a traditional server is like ordering a series of books and having them all shipped to your house individually, whereas a CDN server is like being sent a single flash drive of all the books in pdf format.
CDNs Allow for Greater Scalability
The distributed nature of CDNs can allow for much greater scalability than using a standard web server alone. For example, if you currently have 500 visitors to your site a day, a typical web server can handle that without much trouble. However, if you suddenly find yourself with 50,000 visitors a day, you will likely find out your budget hosting package is not going to be sufficient to accommodate all the traffic required to make each of the 50,000 visitors satisfied. A CDN can allow those 50,000 visitors different ways to access your site depending on geography and server loads, so each visitor can access your site through a route of least resistance and greater speeds.
CDNs Aid in Aspects of Site Security
As we have pointed out, securing your website requires planning, preparation, and proactiveness on the part of the site owner, and there are no “magic bullets” when it comes to security. While using a CDN will not instantly make your site secure, it can help in certain situations. For example, a crude yet effective way to bring a website down is through the use of denial of service attacks, which is where an automated program will flood your site with more traffic than the web server can handle. A CDN will likely have systems in place to recognize and thwart this traffic, and even if that isn’t effective by itself it will at least spread the attacks over a large area. This can have the huge advantage of keeping your site operational while you fix the root cause of the attack.
How do I use a CDN on my Site?
Whether you are using WordPress, Magento, or any other CMS incorporating a CDN is possible and highly recommended. Each hosting setup is different, necessitating a tailored approach to each. In addition, there are many different ways to establish a CDN on your site, i.e. rerouting the entire site through a CDN vs. using a CDN for only certain site assets like image files.
If you are serious about improving site speed and performance, you should make CDN implementation a top priority. Send us a note and we’ll be happy to help move your site into new realms of performance.