Moodle on Azure

Moodle on Azure

by Khurram Ahmad -
Number of replies: 6

We are using moodle as lms in our university. During this covid-19 pandemic our moodle instance usage is increased. For this we have setup moodle at azure server to manage large requests. 

Currently, we are facing load issue in our moodle when students are trying to upload files against assignments. Keep in mind that we are currently using assignment option for mid and end term exam to ask students to upload papers as assignments. 

Details of moodle usage in given below. See the screenshot attached for Azure Server configurations with moodle to view complete picture of implementation

We need moodle performance recommendations for mentioned architecture including enhancement settings to achieve smooth operations and manage large number of request. 

Our Current Moodle Usage 

- Total Moodle Reg. Users: 20,000
- Max. Concurrent users: 1500
- Courses: 3500

Azure Specification

- Moodle VM1 (PFA)
- Moodle VM2 (PFA)
- Azure mysql-db-instance (PFA)
- WAF (PFA)

Attachment extra-php-memory.jpg
Attachment moodle-vm1.jpg
Attachment moodle-vm2.jpg
Attachment mysql-instance.jpg
Attachment waf-instance.jpg
Average of ratings: -
In reply to Khurram Ahmad

Re: Moodle on Azure

by Ken Task -
Picture of Particularly helpful Moodlers

Qualifications for this response ... none.  Don't run Azure VM. And am not a developer of Moodle (are you?).  But have been running moodles for years and had only one experience at helping a small college with Ubuntu VM behind Azure in the past.

Am gonna guess that reason no one has responded to this posting
is few host a moodle behind Azure.  Your sharing here has been
all about what's in front of the moodle, but not the moodle itself.

In the moodle VM ... Moellim-1?
Site Admin Menu -> Server -> PHP Info
What does the first line show?

According to what you have shared, DB server is dedicated?
and on a machine you show as mysql-m6vy66.mysql.database.azure.com
How about the config/performance of/error logs etc. of that server?

Maybe with more information about the moodle itself, you'll get some suggestions.

'SoS', Ken

In reply to Ken Task

Re: Moodle on Azure

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I work for a Moodle partner (Titus Learning)  that uses Amazon Web Services (AWS), like many other Moodle sites. I have nothing to do with that side of our work, but the people that do seem very happy with it. There have been a lot of posts in the performance forum that seem knowledgable, check that out.
In reply to Khurram Ahmad

Re: Moodle on Azure

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I have heard comments at Moodle Moots from people who have tried to host Moodle on different cloud provider, and the consensus is that it is much easier to get it to work well on AWS. Many people have managed that. In contrast, I can only remember one comment from someone who got their site working well on Azure, and they had received some special help from Microsoft support get reasonable performance.

The OU created some test Moodle installs in Azure as a learning experience, and what we have learned is that we want to use AWS when we start moving our production sites to the cloud wink.
Average of ratings: Useful (2)
In reply to Khurram Ahmad

Re: Moodle on Azure

by Alistair Spark -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

First thing you might want to look at is https://github.com/Azure/Moodle

It's feasible to host Moodle on Azure, but you mostly have to keep managing VMs like in the on-prem world whereas in AWS you can mostly use native services which reduce the maintenance burden. Managed services in Azure aren't AWS scale and maybe not as well managed.

It becomes particularly relevant to use native services when breaching the 4000 concurrent (1 minute interval)  users and Redis needs to scale but open-source Redis is single-threaded whereas Elasticache is multi-threaded. That can probably be achieved with Redis Enterprise but pricing is a different order of magnitude.

Average of ratings: Useful (1)
In reply to Alistair Spark

Re: Moodle on Azure

by Colin Fraser -
Picture of Documentation writers Picture of Testers
I don't understand a single word of that last paragraph Alistair, really, (I have fewer qualifications than Ken in this area). I would, however, offer that my limited experience with Azure is that it just can't handle large traffic loads unless you are prepared to put lots of money into it. I am certainly not talking the numbers that Khurram is citing, btw. Oh, Azure is from the Dark Side, and I would suggest that anyone dealing with the Dark Side needs to be very careful and really understand what they are getting for their money.
In reply to Khurram Ahmad

Re: Moodle on Azure

by Ken Task -
Picture of Particularly helpful Moodlers

Looks like the consensus of responses say don't use Azure.

Still, if you have something you'd like to keep and transition to Amazon/Other, that would mean getting into the Guest OS (one of your Moodle VM#) and backing up the code + getting an SQL dump from the remote MySQL server + an archive of the moodledata directory.

Am guessing the VM#'s are linux so there is also the possibility to use tools like rsync to get code + moodledata to new hosting environment.  And there is a tool built into Moodle (experimental me thinks) that could transfer the DB from current Azure hosted DB server to a MySQL DB server you point to.

2 cents.

'SoS', Ken