Using Boost with Drupal - Making a McWebsite

Boost Module for Drupal - Make Your Site a McSiteTo the uninitiated, Boost is a module for Drupal which has the potential to make your Drupal-based website run many times faster than it's currently running. Boost basically converts pages on a Drupal site into static html files, and allows your website to direct anonymous (non-logged-in) users to the cached html pages.

Doing so speeds your site up quite a bit, because instead of your web server having to run some PHP scripts and connect to your website's database, the server can simply send the complete html file, which requires no extra processor cycles or memory to compile. If your website has a lot of anonymous traffic, the potential speedup is very large. Instead of serving hundreds of users per minute, you could serve thousands.

Make Your Website a McWebsite

A good analogy to think of when speaking of the way a server handles serving a page with Drupal, Joomla, or other CMSes is this: Imagine that you run a fast-food restaurant, and you want to serve as many customers as possible in a short period of time. You could either wait for an order for a double cheeseburger, then when the order comes in, put the parts together, wrap it up, and then hand it to the customer. Or, you could make a bunch of the burgers, wrap them, and have them sitting on a warmer. Then, when a customer orders a double cheeseburger—or ten—your staff can grab them from the shelf and immediately serve your customer.

Instant gratification. It works for McDonalds, and it can work for your website; How many customers have you served? McDonalds has served billions. Your McWebsite could do the same. Boost is basically a large-scale cheeseburger-maker. You want your website to be the McRestaurant server—prepackage everything so you can serve it up quickly and en masse.

Pushing for Boost

In the past few months, the Boost module has gained a lot of momentum, due largely to the fact that it is nearing a release candidate for Drupal 6. It has also gotten a lot easier to deploy on live sites. I just deployed it on the Saint Louis Review website yesterday (earlier case study here), and it's doing a great job! You can see a case study from the UN's Millennium Campaign as well (another great read!). There's a lot of momentum behind Boost, for good reason:

  • Boost frees up precious RAM
    If you have limited memory resources (who doesn't?), it's important to conserve, especially if your server has lots of hits in a short period of time. An Apache daemon serving a typical html file takes 2-3 MB of RAM. An Apache daemon serving a typical Drupal PHP script will take 20-30 MB (or more!) on average. For a high-traffic site, that means you could have ten times the RAM available!
  • Boost makes website users happy
    Because the html file is precompiled, the server can immediately send it out to the browser; no need to take up precious milliseconds of processing time to compile the page. McDonalds makes people happy by serving okay-tasting food fast. You want your website to serve people fast, too... Quality content is up to you though ;-)
  • Boost simply works
    The module has been in development for almost four years, and has seen releases for Drupal 4, 5 and 6. Its maturity and popularity have made even the latest beta version quite stable and easy to set up. It's a little harder to set up than most modules, but if you know how to copy and paste, you're likely able to set up Boost.

Boost is not a magic solution, however. You still have to set a cache lifetime, after which pages will have to be refreshed from the PHP and database. You'll need to make sure your cron jobs are running well and as often (at least) as the minimum cache lifetime is set. Also, the caching only works for anonymous users (just like Drupal's built-in database-based caching)... there's still no real solution for caching for authenticated users.

But the virtues far outweigh the downsides. On any Apache server with .htaccess enabled, you can make your site fly for anonymous users, with a minimum of hassle. Before purchasing expensive hardware upgrades, try boosting your site, eh? Just be sure you read the included INSTALL.txt file and follow the directions correctly. If you can't use .htaccess files, or if you can't otherwise get Boost working, at least turn on Drupal's "Normal" level page caching in the Performance section of Drupal Administration (/admin/settings/performance).

More Resources

Here are some of my favorite resources when it comes to speeding up web page serving:


@mikeytown2 - Thanks! Interestingly, this post has been on the top of for over a day now... I guess nobody's focusing on Drupal-blogging on a weekend? I thought there was an #ireviewdrupal sprint going on. Maybe everyone's focusing on that right now.

It sounds like the wordpress equivalent 'Super Cache' if I remember correctly. It must save tons of bandwidth, as well as speed up the user's experience,which is great if you have to use a dial up modem like me *sigh*. Very informative, thanks

@ Rob - Yes, that's exactly what it is. I haven't had a Wordpress site where I've needed that yet, though. It might save a little bandwidth, but the main job is to keep the server from having to process all the PHP it normally would during each page load, thus allowing downloads to begin quicker and more plentifully.