Announcing the Fastly Drupal 7 Module
We’re always looking for ways to make it easier to integrate with Fastly. Recently, we’ve targeted a few high-profile frameworks, such as Ruby on Rails, and built plugins for them. This week, we’re happy to announce the latest plugin in our growing library: the Fastly Drupal 7 Module.
Currently in beta, the module allows you to set up a new Fastly account, manually purge content, and automatically purge pages when content nodes change. In this post, we’ll walk through some of the features of the module and show you how to get started!
How It Works
Fastly is an advanced and globally distributed Content Delivery Network (CDN). We cache website content closer to users, which reduces network latency and makes sites faster. This has the added benefit of reducing load on origin servers, making it easier to scale websites as they grow in popularity.
Traditionally, CDNs were only able to serve static assets like images and scripts, but because we’ve created an advanced architecture built on Varnish and SSDs, Fastly allows you to go beyond the static and also cache dynamic assets, such as entire web pages. Whenever content changes, one simply issues an instant purge request, which removes cached content copies from our global network in a fraction of a second.
The Fastly Drupal module makes the process even easier by fully automating this cache-purge behavior. Once enabled, the module automatically detects when content has changed on your Drupal website and issues the appropriate purge requests on your behalf.
Using the Module
Setting up your Drupal 7 site to use Fastly is quick and easy. Here’s how:
Download and install the Fastly Module: You can download the module here. Note that you must also enable the Rules, Entity Tokens, and Entity API modules before enabling the Fastly module.
Sign up for a Fastly Account: The module’s configuration panel presents a form that allows you to set up your account quickly and easily. We also configure your site to be recognized by Fastly.
Create a CNAME Record for your Domain: This step requires you to tell your domain registrar that you’d like to serve your content via Fastly. To do so, you’ll need to set or modify a CNAME record for your domain. This is a special type of DNS record that forwards all request for your domain to Fastly.
The setup process for CNAME records varies from provider-to-provider, for detailed information please see our CNAME instructions.
Once you’ve finished these three steps, your Drupal 7 site will be enabled and working on Fastly. In addition to automated purges, the module gives you access to more advanced features through the configuration section. With the module you can:
Issue manual purges, including surrogate-key purges and purges of the entire site
Change the default Time-To-Live for content being served by Fastly
Specify particular pages that should not be cached
Gain access to the full Fastly API with the presented API key
In addition to the in-module tools, you get full access to the Fastly Configuration Application using the credentials you specified during signup. The app allows you to fully customize your Fastly configuration and to ensure you are getting the best performance possible out of your Drupal 7 website.
A Call to Action
We’ve worked with some great folks to build this module but there is still more work to do! To that end, we’d like to invite Drupal users from all walks to install the module, try it out, ask questions, open bugs, and help guide us as we continue development. Our goal is not only to build a good CDN module but a tool that helps strengthen and support the Drupal community as a whole.
We’ll be at DrupalCon in Austin, TX from June 2nd through June 6th. Come by, say hi, and find out more about Fastly and the Drupal module.