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

This guide assumes that you have multiple fast and beefy Web and DB servers.

  1. Enable MySQL Query Cache
  2. Use a PHP cache
  3. 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.

  4. Use mod_gzip (or ob_compress or whatever it is in php, I prefer mod_gzip, or mod_deflate in Apache2)
  5. 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.

    To enable this feature, put the following code in your .htaccess file, if you are running with Apache 2 and mod_deflate enabled

    # Enable file compression by MIME type
    AddOutputFilterByType DEFLATE text/* application/javascript application/x-javascript application/rss+xml application/xml
    
  6. Get a load balancer, or a reverse HTTP proxy (squid) to distribute the load
  7. Use Memcache for storing Cache and Session tables
  8. Do MySQL replication
  9. Use a module to convert Drupal pages into Static Pages i.e. Boost

Comments

haisam’s picture

Also one can use memcached. Drupal already has a module for this.