Save on hosting with Content Delivery Networks
When people start talking about site speed a popular recommendation is a Content Delivery Network or CDN, this leads to a fairly popular question, what is a CDN and when should you consider using one?
What Is A Content Delivery Network?
Your first visitor will see no noticeable speed increase as the CDN needs to fetch and display the images just as the visitor would have. The second time they or anyone else loads the page however the CDN will instead of fetching the content from your site, display the content which it has locally. If someone visits from an alternate country at the same time the CDN will pass the image from the initial server across to a server which is geographically closer to the visitor within its own distributed network so that the fastest possible download times are available for all users.
This doesn’t effect dynamically generated content e.g. the words you type into your content management system will still be fetched directly from your webserver, however if properly setup all images you upload will automatically have their links updated so that every image you upload within the article is automatically setup to be pulled from the CDN rather than from your webserver.
There are some downsides to CDNs which make them restrictive to smaller sites without much traffic, namely;
- A CDN will charge a minimal amount for each file downloaded. This amount is usually cheaper than actual bandwidth costs incurred by your hosting provider, however most hosting providers will not charge additional amounts for data downloaded (unless you exceed bandwidth quotas) and even though this is a very minimal amount there will still be a bill of around 1 to 2 dollars a month for a low traffic site.
- There is a chance a user may see an out of date image. This is due to the way the CDN holds onto a local copy of the image, so you may change an image with a printed price on it for example and not all users will instantly see that change.
These downsides are quite minimal however and should not discourage anyone from implementing a CDN on any site receiving a moderate number of views. Larger sites should also consider using a CDN to reduce bandwidth costs since a majority of the bandwidth used by a site is in the delivery of static content in the form of images.