[Mediawiki-l] Mediawiki clusters

Daniel J McDonald dan.mcdonald at austinenergy.com
Tue Jun 20 17:57:37 UTC 2006


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!


-- 
Daniel J McDonald, CCIE #2495, CNX, CISSP #78281
Austin Energy

gpg Key: http://austinnetworkdesign.com/pgp.key
Key fingerprint = B527 F53D 0C8C D38B DCC7  901D 2F19 A13A 22E8 A76A




More information about the MediaWiki-l mailing list