Brion Vibber wrote:
Daniel J McDonald wrote:
With replication, there is only one writeable node. How do you force mediawiki to do reads from replica #n and writes to the master?
Code that works with the database asks the load balancer for a database connection object that's either the master (for write or time-sensitive read work) or a randomly selected not-too-lagged slave (for non-sensitive read work).
See LoadBalancer.php.
Ok, I get it. The master is listed in the wgDBServer variable, and the slaves in the wgDBServers array of arrays. Upon failure of the master, it's a manual process to get writes working again, but reads should function fine.
Since I already have my wiki on a replicated 4.1 database, it's a whole lot less work than building a new MySQL 5.0 cluster from scratch with that large learning curve.
Y'all have been most helpful!