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!
seprating moodle servers from moodledata and mysql servers for large amount of users
Number of replies: 11Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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 "
?!
$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 "
?!
Odp: Re: seprating moodle servers from moodledata and mysql servers for large amount of users
You have to share moodledata directory at filesystem level. The easiest way is to export moodledata via nfs and mount it on second server.
Re: Odp: Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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!
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!
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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
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
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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
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
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
Thanks all!
It seems I should start study about it more carefully. This forum had the benefit for me in clearing problem space.
It seems I should start study about it more carefully. This forum had the benefit for me in clearing problem space.
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
can anyone introduce a resource to help me how can I separate mysql server from the web server? I have not found anything yet!!
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
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
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.
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
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.
Re: seprating moodle servers from moodledata and mysql servers for large amount of users
I got it! thanks a lot.