views:

186

answers:

1

I just created an MediaWiki website at Amazon EC2 using Turnkey's MediaWiki package (see http://www.turnkeylinux.org/mediawiki) and for performance and resilience I would like to run the same MediaWiki content from two different EC2 locations (US and EU).

Is that possible? Maybe using and EBS volume? (see http://www.turnkeylinux.org/docs/ec2/launch for details on how to setup EBS volumes)

A: 

Well, the real problem here is that you need either:

a) Two MediaWiki installs pointing back at the same mySQL or Postgres database, or: b) Two MediaWiki + mySQL/Postgres installs replicating data from a master to a slave, but the MW slave would have to point back at the mySQL master for writes.

You can do these with normal MediaWiki but I'm not sure what options the Turnkey package removes from you in the name of convenience. It looks like it automatically spins up a mySQL on each instance for you. If you can hack the configs you might be able to point MediaWiki on system2 back at the mySQL on system1 (port 12332, using SSL).

EBS doesn't really help you here since one EBS can't be mounted off two instances simultaneously.

A lot of it is what your goal is... Option a) will be slow for the remote app server, so if you want better performance out of your European MW that won't get you it (perhaps if you tune the caching well...), and it doesn't help for redundancy (if the db's down, everything's down). But it might be as simple as editing your LocalSettings.php and changing $wgDBserver (you'll want to elastic IP both servers so that you're not always losing track of them).

Option b) is more complicated and still slow for writes but would get better read performance and availability.

mxyzplk