scaling drupal - an open-source infrastructure for high-traffic drupal sites
when the times comes for scalability. moving of of the garageif you are lucky, eventually the time comes when you need to service more users than your system can handle. your initial steps should clearly focus on getting the most out of the built-in drupal optimization functionality, considering drupal performance modules, optimizing your php (including considering op-code caching) and working on database performance. John VanDyk and Matt Westgate have an excellent chapter on this subject in their new book, "pro drupal development"
once these steps are exhausted, inevitability you'll start looking at your hardware and network deployment.
a well designed deployment will not only increase your scalability, but will also enhance your redundancy by removing single points of failure. implemented properly, an unmodified drupal install can run on this new deployment, blissfully unaware of the clustering, routing and caching going on behind the scenes.
incremental steps towards scalability
in this article, i outline a step-by-step process for incrementally scaling your deployment, from a simple single-node drupal install running all components of the system, all the way to a load balanced, multi node system with database level optimization and clustering.
since you almost certainly don't want to jump straight from your single node system to the mother of all redundant clustered systems in one step, i've broken this down into 5 incremental steps, each one building on the last. each step along the way is a perfectly viable deployment.
tasty recipesi give full step-by-step recipes for each deployment, that with a decent working knowledge of linux, should allow you to get a working system up and running. my examples are for apache2, mysql5 and drupal5 on debian etch, but may still be useful for other versions / flavors.
note that these aren't battle-hardened production configurations, but rather illustrative minimal configurations that you can take and iterate to serve your specific needs.
the 5 deployment configurationsthe table below outlines the properties of each of the suggested configurations:
|step 0||step 1||step 2||step 3||step 4||step 5|
|separate web and db||no||yes||yes||yes||yes||yes|
|clustered web tier||no||no||yes||yes||yes||yes|
|redundant load balancer||no||no||no||yes||yes||yes|
|db optimization and segmentation||no||no||no||no||yes||yes|