Every paying Pressable customer has their content served using a Content Delivery Network (CDN). This guide will help you to learn a bit about a CDN, so that you know what’s going on behind your website.
Why a CDN?
Around 80% – 90% of end-user response time on the front end of your website is spent downloading all of the different components of your page. This includes web objects such as text, graphics, images, URLs and scripts, downloadable objects such as media files, software and documents, live-streaming media, on-demand media, social media widgets and content, and applications such as e-commerce and portals.
You might think that the best way to speed up your website is to start ditching assets, however a more effective method is to find a better way for delivering them. That’s where a CDN comes in.
How it works
A CDN is a distributed network of servers that stores cached versions of your content for fast delivery. Normally, a server delivers your content to your visitor’s computer. If your server is in New York and you have a visitor in Tokyo, your content could potentially take a long time to get there. If you have large website with a lot of assets, your website could be crawling. Remember that seconds on the web mean lost business and lost revenue.
When your content is stored on a CDN, it is distributed across the network’s servers, and the content is delivered from the optimum location for that user. The CDN uses an algorithm to determine whether the best location is:
- the server from which it will take the fewest hops to deliver the content
- the server whose distance is the least number of network seconds from the requesting client
- the server with the highest availability in terms of server performance.
Some techniques that a CDN will employ include:
- Caching – the CDN will store popular content on servers that have the greatest demand for that content.
- Load balancing – traffic is shared over multiple servers or web caches.
- Request routing – directs client requests to the content source best able to serve the request. This could be the closest node, or the one with the greatest capacity.
Benefits to Using a CDN
Your website assets are replicated across the CDN, which determines the best location from which to deliver the content. The advantages to this are:
- Faster load times.
- Better performance.
- Better user experience.
- Improvements in SEO – Google has made it clear that faster sites rank higher.
- Protection against surges in traffic – If you have a sudden traffic spike, the load is distributed across global servers that are able to deal with serving the content.
- Protection against DoS attacks or network malfunction – If there is a large-scale attack or malfunction that disables many servers, content on the CDN will remain available to some users.
- Inherently provides backup, archiving and storage through the storage of assets across the network.
How a CDN works with WordPress
Whenever you upload an image, for example, to your Pressable website, this will automatically be mirrored on the CDN. Your URLs will be rewritten with the link to the location of the object on the CDN. This means that the CDN is responsible for serving that content to your visitors, making your website as speedy as it can be.