HowTo: Moodledata on separate server

HowTo: Moodledata on separate server

by Safeen Shun -
Number of replies: 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.

Average of ratings: -
In reply to Safeen Shun

Re: HowTo: Moodledata on separate server

by 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 smile

Regards

Marc 

Average of ratings: Useful (1)
In reply to Marc Kowal

Re: HowTo: Moodledata on separate server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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.
Average of ratings: Useful (2)
In reply to Howard Miller

Re: HowTo: Moodledata on separate server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of 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?

Average of ratings: Useful (2)
In reply to Visvanath Ratnaweera

Re: HowTo: Moodledata on separate server

by Marc Kowal -
I think i'm the wrong person to ask for "auto-scaling", as it's not a word i used ;)
In reply to Howard Miller

Re: HowTo: Moodledata on separate server

by 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.
In reply to Safeen Shun

Re: HowTo: Moodledata on separate server

by 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.
Average of ratings: Useful (1)
In reply to Safeen Shun

Re: HowTo: Moodledata on separate server

by Santosh Nagargoje -
Hey Safeen, did you get the right solution? because I am also searching for the right answer. if you got a solution please share it.