Moodle 3.5 autoscalling installation on AWS

Hi,

I am validating a Moodle 3.5 AWS installation configured to autoscale in order to support variation in traffic at better cost then always having the base load capacity. Implementation is in part based on this design https://github.com/aws-samples/aws-refarch-moodle

This configuration work great in testing and I obtain great performance and autoscaling when needed the only problem I got is with H5P video content(the only type of H5P content whe use) initial caching take between 1 to 2 minute for each video (once opcache cached the page subsequent loading take less than a second).

That is clearly due to somewhat high latency on the shared volume used for the Moodle appdata that is on the AWS kind of NFS as a service called EFS, if I put the moodle data volume on the EBS volume (the local SSD) the loading time of the H5P video take less then a second as normal.

All the other core Moodle module work great with the NFS latency only H5P is unusable I expect because of a large number of files needed to be accesed on the shared volume it's not really throughput that is a problem at around 100Mbyte/sec.

Is there H5P repertories on the data volume that I could repatriate on the not shared volume(using symlinks for exemple) to get this working as Moodle intended and be able to use H5p in my scenario, or other solution peolple use when they need to cluster webserver with H5P ?

Any help would be greatly appreciated. Best regards.

Summary: 
H5P with Moodle with NFS shared volume (bad IOP/sec)
icc's picture

From the top of my head here are two things you could try:
1. Use a direct link(http://...) to the video instead of uploading it in the editor.
2. Try to completely disable the H5P download/export in the settings for the plugin.

Another idea could be to try and sync the files in the files table that are under the /libraries/ directory for the mod_hvp plugin to all of the instances. 

Hi Icc,

thanks for the feedback.

I didn't mentionned it but I use Vimeo feed so I don't have video upload/download occuring in this Moodle instance.

H5P download /export have been disabled earlier and the student role does not have these exposed.

Unless I misunderstood your last sugestion, it does not apply, as in my installation it's the moodledata repertory that has higher latency, h5p library files are on the Moodle dataroot volume that it's low latency.

If I temporary put the moodledata repertory ( https://docs.moodle.org/35/en/Moodle_site_moodle_directory ) in my low latency volume H5P work great (on first page generation) otherwise original H5P page generation that are missing from opcache take more than a minute to generate due I suppose to multiple files access in moodledata as I use AWS EFS (with some file preload) throughput is around 100MBytes on this service but IOPs suck big time but is ok for all the rest of the Moodle site with how Moodle work.

As I need to deploy that in multi AZ for SLA garantee I really need a solution that allow me to have my shared moodledata between AZ, I expect other encountered this issue with H5P on Moodle and could have a sugestion ?

Regards.

Hello, we are having the same setup CloudFront + ELB + EC2 + RDS + EFS H5p especially the Course Presentation type takes a lot of time to load the editor. It might take 4-5 minutes to load.

If I inspect element during loading time I can see that the Course Presentation does multiple request of type 'font' and 'script' that they take a lot of time to respond with status code 200.

The second time I load the page the editor loads fast.

Is there a way to have H5P installed in an external website and iframe it to Moodle? I searched for this but I only found plugins for Drupal and WP

Thank you

icc's picture

There's probably no best solution for this out of the box, but if you're looking into an external site for hosting your H5P content I highly suggest that you check out H5P.com and test how the LTI (External Learning Tool in Moodle) works for you. It should be quite easy to use and setup.