Caching the moodledata directory

Re: Caching the moodledata directory

by Roland Chapin -
Number of replies: 1

Andrew,


Thank you very much for the reply.  I was not aware of the new API and I will definitely look into that to see if I can somehow take advantage of that help resolve my problem.

I apologize that I did not explain the reason for wanting to do this; the countries where I will be installing this solution have very poor internet.  We might be lucky to have a reliable 1 Mb connection that might have to serve 20 users for example.  That is the reason we are trying to find a way to serve the 'multimedia-heavy' content over a LAN as opposed to pulling it from the internet.  That is why S3 is not a viable solution for us.

I also understand that is might be simpler to install a series of small Moodle servers at each location, however we are trying to centralize student progress and authentication in the central server.

Any ideas are appreciated.  To give a little more details, our main server is a robust HP DL380 Gen 9 with 10 SSDs plus a Synology NAS for housing the multimedia content (or the entire moodledata directory - depending on the final solution).  The remote caching servers are additional Synology NASes.  The Synology servers are basically Linux boxes with their own OS to simplify management.


Thanks again for suggestions.  

In reply to Roland Chapin

Re: Caching the moodledata directory

by Jeff White -

Roland, 

We have had good results with using Galera clusters with having multiple master DB servers which sounds like what you would need to do in your situation. I don't think Galera clusters are 100% supported by Moodle.org but I have not had any problems of collisions or corruptions. 

I would recommend considering Andrew's suggestion further as it might be a solution for you as you can localize as much content as possible with caching (redis cluster?), localcachedir, moodle directory, opcache, etc while keeping the content that must be in a shared location for Moodle to use AWS. AWS does have solutions to distribute your data across the world and keep it in sync with their back-end methods. 

I hope someone can correct me if I am wrong on the logic with MUC but think how your environment would work with AWS and properly configured caching and directories.

  1. 1st End user requests Content
  2. Moodle checks to see if it has a cache of the content
  3. If not, go to AWS to retrieve the content
  4. Moodle then makes a cache of the content
  5. Moodle delivers the content to the 1st end user
  6. 2nd user requests the same content
  7. Moodle checks to see if it has a cache of the content
  8. Moodle finds it has a cache of the content 
  9. Moodle delivers it to the 2nd end user. 
  10. 2nd user gets the content at near local speeds because it was already cached. 

Question for our Moodle experts. Is there a way to tell Moodle to generate a cache everything in the environment?