Project: CDN module: port Far Future expiration functionality to Drupal 7

published on April 4, 2012

Technologies: 
Drupal
PHP
WPO
Time range: 
January 2012
Client: 
As a: 
freelancer

ONE Agency had an urgent request for me: a client of them, http://worldpressphoto.org, needed to use a CDN for the upcoming (in February) World Press Photo event. They had to optimize it as much as possible, to make the pages load as fast as possible and reduce the load on their origin servers (which were fortunately behind Varnish instances). For this, they turned to my [CDN module for Drupal].

They wanted things to be as fast as possible, so they sponsored me to port the Far Future expiration functionality I had built into the Drupal 6 version of the module to the Drupal 7 version. The Far Future expiration functionality routes the serving of all static resources through Drupal instead of through the web server (Apache/nginx/lighttpd/…), so that it can optimize the serving of each static resource perfectly. There is an obvious performance penalty (overhead of Drupal for serving files), but this is amortized over time because the CDN caches it for long stretches of time (indefinitely, in fact, but e.g. Amazon CloudFront comes back to the origin at least every 24 hours).