In this very brief article, I highlight the key properties of CDNs: what differentiates them and which technical implications you should keep in mind.
A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity.
It is extremely hard to decide which CDN to use. In fact, by just looking at a CDN's performance, it is close to impossible (see “Content Owners Struggling To Compare One CDN To Another” and “How Is CDNs Network Performance For Streaming Measured?”)!
That is why CDNs achieve differentiation through their feature sets, not through performance. Depending on your audience, the geographical spread (the number of PoPs around the world) may be very important to you. A 100% SLA is also nice to have — this means that the CDN guarantees that it will be online 100% of the time.
You may also choose a CDN based on the population methods it supports. There are two big categories here: push and pull. Pull requires virtually no work on your side: all you have to do, is rewrite the URLs to your files: replace your own domain name with the CDN's domain name. The CDN will then apply the Origin Pull technique and will periodically pull the files from the origin (that is your server). How often that is, depends on how you have configured headers (particularly the Expires header). It of course also depends on the software driving the CDN – there is no standard in this field. It may also result in redundant traffic because files are being pulled from the origin server more often than they actually change, but this is a minor drawback in most situations. Push on the other hand requires a fair amount of work from your part to sync files to the CDN. But you gain flexibility because you can decide when files are synced, how often and if any preprocessing should happen. That is much harder to do with Origin Pull CDNs. See this table for an overview:
| Pull | Push | |
|---|---|---|
| Transfer protocol | none | FTP, SFTP, WebDAV, Amazon S3 … |
| Advantages | virtually no setup |
|
| Disadvantages |
| setup |
My aim is to support the following CDNs in this thesis:
This is a republished part of my bachelor thesis text, with thanks to Hasselt University for allowing me to republish it. This is section five in the full text.
Previously in this series:
Comments
Pingback
[...] Key Properties of a CDN | Wim Leers wimleers.com/article/key-properties-of-a-cdn – view page – cached Wim Leers Freelance Drupal Developer Wim Leers Freelance Drupal Developer — From the page [...]
pull refresh
You can control the frequency of how often a pull-CDN refreshes with some URL query trickery:
<?php/**
* We use this so that we don't have to bust the CDN every time someone updates content.
*
* @param string $granularity = 'hour'
* One of 'hour', 'minute'.
* @return string
* URL query string, including '?'.
*/
function _tck_flash_query_string($granularity = 'hour') {
$query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1);
if ($granularity == 'minute') {
return $query_string . date('Ymdhi', $_SERVER['REQUEST_TIME']);
}
return $query_string . date('Ymdh', $_SERVER['REQUEST_TIME']);
}
?>
CDN-specific
This is CDN-specific: not every CDN supports this, because there is no standard for it. E.g. SimpleCDN doesn't support the sample code you posted.
For which CDN is this?
Pingback
[...] Key Properties of a CDN [...]
Pingback
[...] Key Properties of a CDN [...]
Post new comment