Category: Moodle

Cost of Running Moodle as your own

As moodle is open source and have full features which are required to run a digital education platform,

  • WEB platform [online]
  • Mobile App platform [offline suppport]
  • Desktop APp as well [offline support]

there are 1000 of plugin base, an active community, 6 monthly updates so much…..

It is just we have to host it somewhere, and we are ready for the digital education environment.

and if you have a little bit of technical background, you can opt for free cloud service with major cloud provider, and this is all which is required.

Case is not like this, however, this is good for your testing lab .

In a production environment, there is a lot of things that need to be done.

Moodle also provides a hosting plan ( . and you can see the cost for the running platforms.

When you actively use a system, whether for small scale or large scale, if this is adding the value in your objective/business, then, keeping the system healthy and running become a need.

so let me share the cost that may hit you for running the moodle system as your own.

I am dividing it into 3 parts. I am not including any human effort for setting and managing this platform. This cost is just about machine or hosting.

Core Service

  • Domain name
  • SSL certificate [optional, but required for many features like the app, audio/video recording, payment]
  • Computing Cost [ assuming app and Database are on the same machine]
  • Storage Cost
  • Backup Cost
  • Outbound Data transfer [bandwidth utilization cost]

External Service

  • Email Service [may be the very first thing to do after setup]
  • Any third party paid service, like zoom or bigbluebutton
  • any paid theme
  • any paid plugin that you want to use
  • any monitoring tool
  • notification service for mobile


  • Cost of CDN [content delivery network] to optimize the performance
  • Cost of Performance monitoring tools
  • Cost of Caching servers etc.

Core services are required to run the platform. Others are optional and this is just about moodle platform.

So you may be thinking about the amount or the numbers.

Cost Matrix for Core service

I am assuming that we are on a paid AWS account. So let’s calculate it for the core services. This is just a rough idea

Assumption: site-size : 100 GB, active userbase : ~500

Cost Matrix approx onlySupported User base
Domain~ 10-15 $
SSL certifcate (*)~ 200-300 $
Compute~45$(t2.medium)~ 250-750 active users, concurrent active ~100
Database~70$(t2.medium)~ 250-750 active users, concurrent active ~100
Storage : Active~.12$ /GB
= 12$ /100 GB
Bandwidth*~.09 $/GB
.09*100GB = 9$
roughly calculation : (course size * active enrolledusers)
let’s assume for site size
depend upon storage, let’s assume, we are following gold, silver, bronze policy. 7 days, 4 weekly, 12 monthly, 1 yearly

you can say that the bill will be around 150 $ / month to keep running your platform.

Bandwidth cost is so dynamic that, let’s say you upload a video of 100 MB which is on a public page (can be viewed by without login). and it was seen by 10000 people. one person one time. then the cost for this video may be around : (10000 user * 100 MB ) *(.09/1024 MB) = 9 $

9 $ for one video of 100 MB for 10000 serving

Digital Content plays a key role in LMS. this is why Moodle has caps on it. even for the biggest plan, they allow only 1 GB of storage. Less storage, less distribution of content, less bandwidth utilization.

Disclaimer:   the above values are rough figure only.  Even the load matrix are kept by putting jmeter load test on a good course for the active numbers. the variation is because of rampup time and the activity of moodle. viewing course and attending quiz are just pole apart. However this will give you brief idea of cost  and the factors affecting cost.

there are a lot of things that can be done to optimize the cost of the running platform. I will share that in another thread.

Redis Over EFS for Caching In moodle cluster solution

If you are on this page, it means you are going with a scaling part for moodle. Now web server part is okay, the challenge comes with Shared file storage. That is also get resolved by using shared storage like EFS.

In case , if you want to read about horizontal Scaling for moodle cluster solution.

in case of AWS, EFS is good as shared storage for media data.

But if you are using EFS as filestore caching (required and default) , means you are using $CFG->cachedir at EFS location, this will make the system response slow.

Challenge with Memcache to use as application cache mode

So , we see that there are lot of posts for memcache. But the problem with Memcache is , this does not provide data guarantee and locking . For the application cache which are stored in $CFG->cachedir, it is base requirement. Memcache is good option for session store.

Just for reference : there are three type of cache modes in moodle ( application, session, static request [localcache])

Now we have choice for mongo db for application cache with new moodle version. Redis is more popular and have support for session store as well while mongo db mode is application only.

so the the choice for selection are , shared storage EFS or Redis.

I will go with redis, because of following testing results.


Load test Env : 2 aws t2.micro server 1 medium DB server, 1 ALB,  one window  server from another region used for testing.
load test Config:

EFS for caching store

20 user, 30 seconds rampup time, 1 iteration

30 user, 30 seconds rampup time, 1 iteration

40 user, 30 seconds rampup time, 1 iteration

note : system was failed for this test. it is just an upper cap

Redis Cache for caching store (AWS Elasticache, micro server)

20 user, 30 seconds rampup time, 1 iteration

30 user, 30 seconds rampup time, 1 iteration
40 user, 30 seconds rampup time, 1 iteration

note : system was failed for this test. it is just an upper cap


Disclaimer : Test are repeated with same configuration, just a change of Caching store. In both cases, server stats were also monitored and did on a virgin stage. Before putting load, cache were generated by manually following same steps. In spite of all these consideration, Caching store may not be the only reason for difference pattern in response time. There may be other factors as well, however, it is one of the factor.

by comparing above charts, one can see, there was a lot of improvement once i moved my application cache from EFS to REDIS .

20/30/12000-10000 ms1000-2200 ms
30/30/1mostly > 9000 msmostly < 6000 ms

If you are using only one web server, EBS volume results are 10 times better than Redis. It is just , if we have more than one application server and a shared storage, REDIS is performing much better than EFS for cachestore.

more about redis :