Brion Vibber wrote:
Jitse Niesen wrote:
Why is DB_MASTER used instead of DB_SLAVE?
Lagged slaves were too unreliable; you would often see the previous version after saving an edit.
Note that it in a typical page view, it only loads the page table row from the master. It then tries to load the revision and text rows from a slave using the up-to-date revision ID given by the master. If the revision is not present, it falls back to a load from the master. The overhead from doing this short, simple page table query to the master appears to be minimal. Most of the other operations in Article.php are write operations, and thus need the master connection.
-- Tim Starling