HowTo: Moodledata on separate server

HowTo: Moodledata on separate server

napisao/la Safeen Shun -
Broj odgovora: 7

Hi,
I want to start auto-scale (ing) and was wondering if there is a best practice for moving/having moddledata on a separate server.

To be frank I am looking for guidance on what do you think is best practice, and would appreciate it  more if there is a HowTo and you can guide me to it. If not, just pointing me to the right direction would be a great help.

I intend to doing some research on using NFS. 

Not sure if rsync, or scp is better for transferring the current moddledata which is on the same server as the moodle site, to the new dedicated server.

From what I have read is that using NFS is slower than local disk, and that might be especially true for session data.

Any guidance will be much appreciated.

Odgovor na Safeen Shun

Re: HowTo: Moodledata on separate server

napisao/la Marc Kowal -

Hi,

depending on your Moodle-Size, the fastest setup is an "All-in-one" setup with moodledata and database on one single Server.

If the size grows, you have more accesses and/or want to split the system for some reasons, you should move your moodledata to a fast and reliable NFS-Storage AND (that's important) move your SESSIONS into Database (or better memcached or Redis).

To move your data, you should use rsync with -A (or at least keeping user/group depending on your setup) - your UID/GID's should exist on remote NFS-System to make things easier.

If you think about clustering your system, you may run into several issues we can discuss later osmijeh

Regards

Marc 

Odgovor na Marc Kowal

Re: HowTo: Moodledata on separate server

napisao/la Howard Miller -
Slika Core developers Slika Documentation writers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers
Firstly, moving this to Hardware and Performance forum....

I strongly disagree about moving sessions to the database. It works, but only on small sites. On large sites it will kill your database stone dead.

What you should definitely do is to move the Cache (MUC) stores to a dedicated Redis server. While you're there you should also move the sessions to Redis. The settings for the latter are in (well commented) in config-dist.php. You may also consider shifting file locking from moodledata to the database (also in config-dist.php).

These are just the headlines, if you need more info let us know.
Odgovor na Howard Miller

Re: HowTo: Moodledata on separate server

napisao/la Visvanath Ratnaweera -
Slika Particularly helpful Moodlers Slika Translators

..and the duty for being in the "Hardware and performance" forum, read its documentation! See the header of https://moodle.org/mod/forum/view.php?id=596!

@Marc, what is 'auto-scaling' BTW?

Odgovor na Howard Miller

Re: HowTo: Moodledata on separate server

napisao/la Marc Kowal -
So you prefer sessions on nfs mounted drive on large and clustered sites? Don't know how it works nowadays but some years ago nfs wasn't a option for sessions.
Odgovor na Safeen Shun

Re: HowTo: Moodledata on separate server

napisao/la Safeen Shun -
Thank you ever so much for the great advice and tips. I will do my best with the info given here and see where I get upto. I may come back at a later date and revive the post if I face any issues.

Marc Kowal - I was hoping to do loadbalancing as it is based on GCP and wanted the entire system to scale up and down automatically (auto-scaling).
Howard Miller - thank you for moving it to hardware section as I was not sure where to put it and thought this was the best place (obviously I was wrong). Your comment had a lot of things for me to digest and I am on it. I shall dig as deep as I can before I come back and ask for more advice. But first I need to thoroughly digest what you said here and try to implement it.
Visvanath Ratnaweera - Thank you for the link to the category there are some rather intresting posts there to me.
I very much appreciate your help here, thank you ever so much.