LearnDash mainly would deal with logged i wordpress users and as such Cloudflare caching usefulness would be limited to static assets and if you enable CF cache everything for guest dynamic HTML cache. But web site performance is only as good as it’s weakest link and server performance involves both front end (at CF edge + web server origin) and backend (origin server PHP/MySQL/cpu/ram/disk resources and tuning) optimisations.
As LearnDash is predominantly logged in user specific, then CF cache misses for dynamic HTML generated content for logged in users would hit your origin server. So your site performance would be only as good as your origin server/hosting performance.
Although LearnDash is a leading player, it is very resource-intensive. By nature, applications that need to dynamically render real-time personalized content such as an LMS (Learning Management System) will require content to be largely uncached and users to be logged in to the backend. LearnDash is no exception to this inherent problem.
In this post, we’ll see why there isn’t a lot that WordPress hosting providers can do, besides matching the CPU power that is needed for LearnDash to properly function, and how Pressidium addresses these general performance issues.
How is WordPress LearnDash resource intensive?
No matter if you have a low or high traffic e-learning site you will experience technical problems once you start placing demands on it. This might be through the number of registered users, the number of courses, number of simultaneously active users, or any combination of these. These problems can range from full hardware utilization and throttling, database write problems to users experiencing severe slow-downs, even interruptions during course time.
Database throttling and transaction conflicts
LearnDash executes some long sets of SQL queries. For example, if you have a large number of users, say 20,000, LearnDash will fetch all of them even if you just want to select one profile to edit.
Basic server clustering solutions are also of little help in this case. Almost every action performed in LearnDash updates the database. When the server cluster that is serving your LearnDash e-learning site is under heavy load, the cluster server nodes are constantly writing to the database. This can lead to transaction conflicts .
In high-traffic situations, these can often result in database table locks, or a full database-lock, disallowing write access to everyone. This of course, is disastrous.
Peak CPU utilization
WordPress LearnDash by nature is a dynamic application that does not cooperate well with caching strategies. This is not LearnDash’s fault as we said in the beginning, but it does mean that you can’t simply accelerate its performance, just by caching HTTP responses.
This is so because there are logged-in users, that are in the middle of multiple-choice tests, with timers & content that needs to be uniquely rendered for them, and simply there is very little that can be cached.
So having almost all content uncached, means that each LearnDash user that is taking a test, will spawn at least, 1 backend PHP process. Imagine what will happen, if 50 users log-in nearly simultaneously!
In general, for a user to experience a smooth LearnDash session, they will need dedicated CPU resources. However, CPU demand is not constant, as each user may spend some idle time online, while doing the test. If the total amount of the backend PHP processes waiting to be served is a multiple of your total CPU pool resources, and you don’t do something drastic to lessen the load (for example, shut down some of them), an avalanche will start and you will lose the entire server.
To sum up, simple VPS setups and WordPress hosting plans that are not Enterprise will only be able to handle a few dozen of logged-in users at best. In those cases where all of the users perform some action nearly simultaneously, you’ll hit a peak, and everything will start failing.
I haven’t used LearnDash myself but have been looking at learning management platforms for my own project/product usage and from my limited research all Wordpress based LMS systems would all have similar limitations due to logged in users not being able to leverage CF and other levels of caching that guest non-logged in users can. And fact is Wordpress performance without caching is pretty poor out of the box.
Quoting myself on some comments I made on my forums when I was discussing LMS options
Basically if you’re using LearnDash, prepare to throw more server hardware at your hosting side when you have more concurrent logged in users.