Simple Decision Tree for Drupal Enterprise Scalability

Contributed by Benson Wong on the developer's email list.
February 2006

Here's my scaling tree. As you progress up the tree, you will find that time, money, maintenance, headaches will all increase.

1. Use a PHP cache:

I found that using APC speeds up Drupal by a lot, 3 to 5 times the pages view per second. This was _literally_ a 5 minute install (on FreeBSD) for a 300% to 500% performance improvement. I think at that point it was my dev servers SATA HDDs were the bottle neck. It sits beside me and when I hit it with ab, I can hear the HDDs wrrrrr like crazy.

2. Use mod_gzip (or ob_compress or whatever it is in php, I prefer mod_gzip, or mod_deflate in Apache2)

The benefits of this are amazing, considering the minimal effort it takes to implement. If doesn't matter if it takes Drupal 0.002 seconds to generate a 40K of html, if it takes like 1 to 2 seconds for a client to download it (more if using a modem). mod_gzip usually gives a 10% to 80% compression depending on the size of pages. Amazing results for 10 minutes of work.

3. Get a faster DB server. I'm thinking of 3x15K SCSI (raid 5), dual way xeon mysql server from freebsdsystems.com for my next installation. These things rip . Expensive (~$5K to $7K) but fast. An average Drupal dev charges like $100USD these days right? A super fast db server is still more bang for your buck than 50 to 70hrs of code performance tuning.

4. Get faster (or more) Web Servers. Maybe not the same specs as above, but fast anyways.

5. Get a load balancer, or a reverse HTTP proxy (squid) to distribute the load

6. Do MySQL replication

7. Profile / tune Drupal's code (shudder).

 
 

Drupal is a registered trademark of Dries Buytaert.