Brothers and pudding: rock solid drupal, day 1

All right, it’s been a long day at Rock Solid Drupal with the Lullabots.  And probably the one during which I’ve seen the most dramatic changes in what is possible in creating the right sort of environment for a drupal site to really scream.  

So far, it’s pretty much about setting up the right environment for Drupal, taking advantage of built-in performance enhancement tools in Drupal, and even using a souped up special distribution of Drupal — an excellent configuration with some custom modifications and performance enhancements called Pressflow, which was created by a Drupal shop called Four Kitchens.

With Pressflow, you have the ability to take advantage of a very slick open source “reverse proxy caching” tool – Varnish.  (Varnish isn’t the only one out there, it’s just one that plays very well with Drupal, and that Pressflow is customized to work with.) 

The idea of a ‘reverse proxy cache’ is that it’s actually situated before the web server and it stores pages in memory (RAM) to display to unauthenticated users. Anything it doesn’t want to use a cached version for it passes on to apache for normal delivery.  But the performance improvements possible are astounding — the page Varnish has cached can be delivered without even touching the web server at all, nevermind the database — since the page is saved in RAM, it doesn’t even need to access a hard disk. 

Think of it like this.  You’re asking your little brother Drop for your car keys.  

  • With no caching at all, when you ask Drop to bring you your car keys, he has to go looking for them all over the house. Eventually he finds them, eats a pudding cup, and wanders back to hand them to you.   
  • With normal caching, Drop has found your keys for you recently and stuffed them in his pocket.  When you ask for them this time he has to get up off the couch, reach into his pocket and pull them out, and bring them to you, but at least he doesn’t have to go looking all over the house, and there’s no need for the pudding cup.  
  • With reverse proxy caching, Drop is standing over you, holding your keys right in your face playing a game of “can’t get mad I’m not touching you.” You don’t even need to ask, just grab the keys, punch him in the gut, and steal his pudding cup on the way out the door.  

There was more today, those are just the highlights.  We capped it off with a Dallas Drupal Meetup where I met a bunch of Drupal guys who are seriously kicking a lot of ass, and just listening to them has my head spinning with ideas and challenges to come. They also made fun of me for being a Buffalo Bills fan, but so does everyone else . . .  

But, looking back at my notes, the biggest thing is just looking at the benchmark numbers we saw today.  At the start, we had a demo site that was delivering about 8 pages per second.  By the end of the day, we were delivering about 3600.  

And that ain’t a typo. 450x better performance.  

We have a lot of work to do back home to start trying to leverage the things we’re learning — migrating to Pressflow will take a little time, and we’re going to be looking at our server environment for the right way to bring it into line with what we’re learning. I suspect that our results won’t be quite so spectacular — these benchmarks and tests assume a site that gets a lot of traffic to a relatively small number of pages that can be cached for anonymous users — but back at our shop we deliver a ton of small sites, and in a lot of cases we are not delivering to anonymous users.  Still, some of what we’ve seen will help a lot, and we still have two more days to go — and while I suspect the improvements we make over the next couple of days will not be as dramatic as going from 8 to 3600, I suspect that those will be the improvements that will help us the most. 

So, use Pressflow.  Varnish it up good.  And don’t take the last pudding cup. 

Leave a Reply

Your email address will not be published. Required fields are marked *