Launch 1 MediaWiki site from two Amazon EC2 servers

I just created a MediaWiki website on Amazon EC2 using the Turnkey MediaWiki package (see http://www.turnkeylinux.org/mediawiki ), and for performance and sustainability, I would like to run the same MediaWiki content from two different places EC2 (US and EU).

Is it possible? Maybe the use and scope of EBS? (see http://www.turnkeylinux.org/docs/ec2/launch to learn how to set up EBS volumes)

+4
source share
1 answer

Well, the real problem here is what you need:

a) Two MediaWiki installations pointing back to the same mySQL or Postgres database, or:

b) Two MediaWiki + mySQL / Postgres establish data replication from the master to the slave, but the MW slave will need to point to the mySQL master file for writing.

You can do this using the usual MediaWiki, but I'm not sure which options the turnkey package is removed from you in the name of convenience. It looks like it automatically deploys mySQL for each instance for you. If you can crack the configs, you can point MediaWiki on system2 back to mySQL on system1 (port 12332 using SSL).

EBS really does not help you, because one EBS cannot be installed simultaneously with two instances.

A lot of what your goal is ... Option a) will be slow for the remote application server, so if you want the best performance from your European MW that won’t get you (maybe if you configure the cache ...) and this does not help for redundancy (if bit is down, everything is down). But it can be as simple as editing your LocalSettings.php and changing $ wgDBserver (you will need to strengthen the IP server of both servers so that you do not always lose them).

Option b) is more difficult and slow to write, but will improve read performance and readability.

+1
source

Source: https://habr.com/ru/post/1301331/


All Articles