Caching the moodledata directory

Re: Caching the moodledata directory

by Jeff White -
Number of replies: 0

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?