can anybody confirm or deny whether Moodle runs on mysql server configured to do multiple-master replication? I would like to set up 2 servers that constantly replicate each other, and i have had very good results with mysql's multiple master replication for doing exactly that.
AFAIK, as long as an application uses AUTO_INCREMENT columns, and unique keys that are guaranteed to be unique across hosts, this should Just Work (R), but I am a complete Moodle newbie, so I'd be grateful for any information on whether Moodle works with this.
Thanks,
-schweini
Re: Multiple master Mysql replication with Moodle?
Dan
Re: Multiple master Mysql replication with Moodle?
anything special i have to watch out for? And how did keep the relevant directories on the filesystem in sync? I'm thinking about an rsync-cronjob every couple of minutes, even though that doesn't seem like the most elegant solution to me....
Thanks for any help,
M.
Re: Multiple master Mysql replication with Moodle?
My question is also the same. In addition how do i sync. the moodle data folder?
Don't do it. Multi-master replication is hard and can corrupt your data.
Just buy a big DB server with lots of RAM, then tune the database to use it. If you can use Postgres.
Get memcache(d) for caching, and use NFS for moodledata on a shared file-store.
Thnak you Tim for your reply. What may be the option to synchronize moodle database and data beside multi master replication?
I want to use moodle which works as the principal of Dropbox. i.e I want to use the moodle in Network down state. Lets suppose we have two moodle servers running at two ends which are disconnected during the day time and will get connect at night. So, If master-master replication is not a good idea, how do i synchronize the database and when the networks is ON at night? I look forward for your advice.
Re: Multiple master Mysql replication with Moodle?
Hi Dibesh,
You may not be familiar with the moodle.org site policies, so please check the Post your question in one forum only section.
You have already posted in five different threads:
https://moodle.org/mod/forum/discuss.php?d=140060#p1123081
https://moodle.org/mod/forum/discuss.php?d=180447#p1123123
https://moodle.org/mod/forum/discuss.php?d=214680#p1123107
https://moodle.org/mod/forum/discuss.php?d=232629#p1123017
https://moodle.org/mod/forum/discuss.php?d=84144#p1122826
Hi Tim,
So you meant the Postgres has better performance than mysql?
Because Im considering to change to Postgres from mysql for my moodle database server.
Thanks,
Toan
To be honest I don't konw.
There are actually two separate measures that are important:
- performance - how fast it isexecuting one particular query
- scalability - how much is slows down as the number of simultaneous users goes up, or the amount of data in the tables gets bigger.
Postgres is very good for scalability, which is why we have used it at the OU for the last 8 years.
There are other important properties you want from a database, like
- Store all your data safely, and never, ever corrupt it.
Posgres is one of the best databse by that measure, which is good for your peace of mind. MySQL is notorious for data integrity issues. Of course, many people use MySQL successfully, so it is possible, but some people have had bad experiences.
I'll second Tim's sentiments here. MySQL has been notorious for being fast, but this is usually at the expense of data integrity. As I recall (and I try to avoid MySQL wherever possible), MySQL is fastest when you disable much of it's ACID compliant functionality so many of the comparisons which people make are not apples for apples comparisons.
Nigel McNie (former Mahara lead developer) wrote a pretty informative post on why he dislikes MySQL (http://nigel.mcnie.name/blog/how-bad-is-mysql). It's an old post, but still largely true.
Postgres currently does not support multi-master replication, but it does support streaming replication and you can use connection poolers such as pgpool which allow you to direct some of your read-only queries (E.g. COUNT, SELECT, etc.) to the slave.
Best wishes,
Andrew