seprating moodle servers from moodledata and mysql servers for large amount of users

seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -
Number of replies: 11
Dear all,
I want to have two moodle web server that share a moodledata and mysql. the load is balanced between these two web server. but I can't find any documentation(step by step) for doing this.
if anybody can help me,I would be extremely thanks full!

Average of ratings: -
In reply to Zahra E

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -
for seprating moodledata from moodle web server I tried to change the config.php in this way:
$CFG->dataroot = 'http://otherserverURL/moodledata'; instead of
$CFG->dataroot = '/var/www/html/moodledata';
and when I wanted to see my homepage I encountered with this error:
"ERROR: You need to create the directory http://otherserverURL/moodledata with web server write access "
?!

In reply to Zahra E

Odp: Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Bartosz Cisek -
You have to share moodledata directory at filesystem level. The easiest way is to export moodledata via nfs and mount it on second server.
In reply to Bartosz Cisek

Re: Odp: Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -
Thanks for your attention Bartosz,
Do you have any documentation or manual to help me for doing what you said?
I don't know how can I exactly do this!
In reply to Zahra E

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by John Andrewartha -
One possible solution is,

Put your moodledat on another machine.
This machine acts as a network file server NFS.
Move the moodle data usually do a tar -cf on the directory will preserve the permissions and ownership.
Copy the tarball to the file server, extract into the new moodledata.

On the moodle server nfs mount the file server on the moodledata directory.

As for Mysql I suggest you invest in the book available from Oriely's.

If you are having problems it ill most likely be running out of threads, too many concurrent hits on the DB, try load balancing.

Have a look at info mysql for a quick look.

Hapy New Year
John
In reply to John Andrewartha

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -

Thank you John,

Please explain more about "On the moodle server nfs mount the file server on the moodledata directory." I'm sorry because I am not experienced in this field!

Happy New Year

In reply to Zahra E

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by John Andrewartha -
Have a look at this from the FreeBSD handbook.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html

One trick with NFS DO NOT MIX YOUR UNIX'S
if you are using Linux version XXX use it for NFS, every vendor has there own idea about it.

Sorry about the shouting but it is realy important.

Cheers John
In reply to John Andrewartha

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -
Thanks all!
It seems I should start study about it more carefully. This forum had the benefit for me in clearing problem space.

In reply to John Andrewartha

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -
can anyone introduce a resource to help me how can I separate mysql server from the web server? I have not found anything yet!!
In reply to Zahra E

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Marc Grober -
not clear on what you mean- are you just wanting to move your SQL server to a different piece of hardware than your web server? If so, have you reviewed moodle docs on migrating and upgrading? If not, look those over as they provide detail on how moodle knows how to find it's db
In reply to Zahra E

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You don't say much about the sort of loads you are expecting but you are possibly entering into an area with some potential pitfalls.

You need to use a technology called "NFS" to connect the moodledata machine to the web servers. You should Google "NFS Howto" but also "NFS Performance" because is has to be fast!! For a system like this you do really need to understand reasonably well how it works so you need to do some reading smile

Having MySQL on a separate machine is simple enough but, again, make sure you do plenty of reading about optimising performance. Don't just increase the number of connections!!

You should also think about plenty of monitoring software so you know what's happening when it's running. We variously using "munin" and "nagios" (the former being much simpler to set up) but there are plenty of others.

I don't think it's appropriate to point you to step by step resources for a high performance set up like this. You *need* to have a good understanding of the issues to get the best out of it.
In reply to Howard Miller

Re: seprating moodle servers from moodledata and mysql servers for large amount of users

by Zahra E -

I got it! thanks a lot.