When it comes to load-times for web pages, faster is always better. It doesn’t matter how incredible a site’s content is, or how effective their social media and advertising strategies are at drawing visitors to a site. If those visitors have to wait for more than two or three seconds for the page to load, it’s increasingly likely they’ll bounce right back to where they came from and continue on to another site.
Slow sites mean lost advertising impressions and clicks, lost opportunities to make a sale, and a poor first impression that is likely to stick with users and influence them to avoid a site in the future.
There are numerous ways to speed up PHP applications like WordPress and Magento, and we’ve talked about many of them before, but for this article we’re going to concentrate on content delivery networks.
If you’re familiar with the idea of caching, then content delivery networks should be easy to understand.
In almost all cases, a site will be hosted on a server or a cluster of servers located in a data center somewhere. There might be secondary backup sites in case of a problem with the main site, but usually sites have one location to which their IP address points.
System administrators and site owners can implement various strategies to get their sites to perform very quickly but having all requests, from everywhere in the world, routed to one place imposes speed limitations that are almost impossible to overcome.
No matter what system administrators do, they can’t overcome the speed of light, and most network infrastructure gets no where near that speed. Round trips that span the globe, or some significant proportion of it, can add seconds to a page’s load-time.
The networks that lie between a site and the user’s browser also impose a time penalty. Every time the signal has to pass through a router or network switch, it experiences a small delay. Sometimes, signals have to pass through dozens of routers, on both the inbound and outbound trips, adding a little bit of time for each one.
The solution is the Content Delivery Network (also known as a Content Distribution Network). To get around the inherent limitations of the Internet, copies of a site or of its static assets are placed in dozens or hundreds of locations around the world. When a browser makes a request for content, it is sent from one of the “edge nodes” rather than from the main server. By routing requests to the nearest of the edge nodes, round trip times can be reduced by orders of magnitude.
Having the site replicated in numerous locations also has other advantages: it reduces the likelihood that a problem with one part of the network is going to knock a site offline, it reduces the load on the main server or cluster, and load can be intelligently distributed around the nodes if there’s a traffic spike.
Sites that rely on advertising revenue and product sales, will more than likely see conversion rate increases that offset the cost of using a content delivery network.
If you’ve used a CDN and had good (or not so good) results, feel free to start a conversation in the comments below.
Image Credit: rexbogg5