H5P on high traffic sites

Does H5P require ongoing access to the database on the host server or does the processing take place on the users computer and only the results are sent to the server.
I am planning to use an LMS such as Learndash or LifterLMS. These systems are already very resource intensive and need very expensive hosting packages to cope with modest numbers of simultaneous users. I want to minimise the cost of hosting by streamlining what the server needs to do for each page for each user, hence my question.

icc's picture

Hi Colin,

It's only the first time you display the content that it can be a bit load intensive. So, the load here will depend on how many users you have creating content.
Pretty much everything in the view can be cached.
The results are sent back to the server via AJAX and shouldn't require a lot of processing. You can also turn this feature off or send the results to an LRS instead.

Don't know if you've considered using H5P.com? It will allow you to insert your content into most LMSes.

Thanks for taking the time to reply.

i have indeed considered H5P.com and might well sign up. I am the only author and I don’t intend to collect results. All my users will be registered to the Wordpress site, but, to keep costs down on H5P.com they wont have an account there. 

Could you tell me more about turning off results sent to the server, where is this setting found?

I’m very interested in your comments about caching the H5P content. LMS pages have lots of dynamic content so don’t generally play well with a cache. To optimise site speed with lots of concurrent users, would you recommend I use self hosted H5P, with a cache for just that, or will H5P.com be a lot better?

Thanks for taking the time to reply.

i have indeed considered H5P.com and might well sign up. I am the only author and I don’t intend to collect results. All my users will be registered to the Wordpress site, but, to keep costs down on H5P.com they wont have an account there. 

Could you tell me more about turning off results sent to the server, where is this setting found?

I’m very interested in your comments about caching the H5P content. LMS pages have lots of dynamic content so don’t generally play well with a
cache. To optimise site speed with lots of concurrent users, would you recommend I use self hosted H5P, with a cache for just the H5P, or will H5P.com be a lot
better?

icc's picture

For results, there's a separate option on the H5P Settings page that you can turn off.

For caching you may have to do some tweaking your self. A simple way to speed up things is to enable opcache + query cache in the database.
For H5P content, in general, all of the display could even be cached to an HTML file.
If you choose to use H5P.com you don't have to worry about any of this.

Any advice on how to create static html file for an H5P object?

I’m leaning very much in favour of H5P.com, but a static html file would be better/cheaper. I think I might be jumping to conclusions about the limitations/ease of producing an html file.

You mention an html ‘display’, would this be different to the end user, compared to the interactive video and quizzes etc that I normally add using a Wordpress plugin?

icc's picture

There are many ways to do this. You could even just hit Ctrl+S in your browser if you're using Chrome and it will save everything into an HTML file for you. But what you want is for your web server to handle this for you. So, a good tip is to read up on your web server. Here's a guide to get you started with caching in NGINX: https://www.nginx.com/blog/nginx-caching-guide/

Do keep in mind that caching is a large topic and that most people would pay a professional to get this right.