Moodle deployment with Azure NetApp Files

Azure Application Gateway
Azure Cache for Redis
Azure Database for MySQL
Azure NetApp Files
Azure Virtual Machine Scale Sets

In a single region, this solution provides highly available access to the Moodle app and other components. For detailed information on availability, see Availability, later in this article. You can also use two regions to implement this solution. With two regions, the solution provides disaster recovery. To protect against an unlikely Azure region failure, you replicate the data volumes to the second region. Only the Azure NetApp Files volumes need to be present in that region.

ApacheĀ® is either a registered trademark or trademark of the Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of this mark.

Architecture

Single-region highly available setup

Architecture diagram showing how students access Moodle. Other components include Azure NetApp Files, Azure Cache for Redis, and Azure Database for MySQL.

Download a PowerPoint file of this architecture.

  1. Students access Moodle application data through Azure Application Gateway.
  2. Moodle is written in PHP. Moodle runs in a virtual machine scale set on a web server such as Apache HTTP Server or NGINX.
  3. Azure NetApp Files makes the content data available to Moodle.
  4. The solution uses Azure Cache for Redis for user session caching, locking, and key awareness.
  5. An Azure Database for MySQL database stores the learning content, student progress data, and internal data.
  6. Learning content enters the system through a secure virtual private network (VPN) gateway directly from the customer datacenter.

Dual-region disaster recovery setup

Architecture diagram showing how students access dual-region Moodle, and how cross-region replication copies data volumes from one region to another.

Download a PowerPoint file of this architecture.

  1. Cross-region replication provides replication for the Azure NetApp Files volumes. This storage-based replication engine is built into Azure NetApp Files.
  2. When you use cross-region replication, you don't have to turn on some components during normal operation. So those components don't incur any cost. When a failover occurs, you can start those components and use them with the replicated data volumes.
  3. After you recover the primary region, the replication direction reverses. The primary region is updated with any changes that were applied during the failover. You can then fail the service back.
  4. Azure Traffic Manager directs users to the region that's currently active.

Components

  • Moodle is a free, open-source learning management system.

  • Azure Database for MySQL is a fully managed relational database service that's based on the community edition of the open-source MySQL database engine.

  • Azure Cache for Redis is a fully managed, in-memory data store that's based on the open-source software Redis.

  • Azure Virtual Machine Scale Sets provides a way to manage a group of load-balanced virtual machines (VMs). The number of VMs in a set automatically increases or decreases in response to demand or a defined schedule.

  • Azure NetApp Files makes it easy to migrate and run file-based applications with no code changes. This shared file-storage service is a joint development from Microsoft and NetApp, a Microsoft partner.

  • Cross-region replication provides a way to replicate data asynchronously from an Azure NetApp Files volume in one region to another Azure NetApp Files volume in another region. This capability provides data protection during region-wide outages or disasters.

  • Azure Application Gateway is a load balancer that manages traffic to web applications.

  • Traffic Manager is a load balancer that distributes traffic to applications across global Azure regions. Traffic Manager also provides public endpoints with high availability and quick responsiveness.

Alternatives

To deploy Moodle, you can use any NFS-based shared file service that meets requirements for very low latency, high IOPS, and high throughput. These conditions are especially important for high numbers of concurrent users. You can use an NFS service that's built on top of a set of Linux VMs. But this approach presents manageability, scalability, and performance challenges. In contrast, Azure NetApp Files offers a competitive, low-latency solution that delivers excellent performance and secure access to NFS shared storage.

Scenario details

Moodle is one of the most popular and widely adopted free, open-source learning management systems. With more than 30 percent of the global market share, Moodle has more than 180,000 customers worldwide. By providing a high-bandwidth, low-latency solution for workloads, Azure NetApp Files meets Moodle's performance requirements. This solution is also flexible. Deployments can grow or shrink on demand to make your configuration cost effective.

Since the emergence of COVID-19, Moodle has seen a surge in growth. The company is now the market leader in learning management systems. This growth has forced Moodle to explore options for quickly expanding its business and enabling customers to quickly and efficiently deploy Moodle instances in the cloud. Moodle architecture relies on the Network File System (NFS) 3.0 protocol (NFSv3) for content storage.

Moodle strives to meet the demands of home workers and to provide the best possible user experience. As a result, Moodle requires:

  • Consistent high-throughput, low-latency access to shared storage.
  • A way to scale up the solution to accommodate an increasing number of concurrent users. Customers prefer autoscaling configurations.

This article outlines a solution that meets Moodle's needs. At the core of the solution is Azure NetApp Files, a first-party storage service. You can use this service to migrate and run the most demanding enterprise-scale file workloads in the cloud:

  • Native Server Message Block (SMB) version 3, NFSv3, and NFSv4.1 file shares
  • Database workloads
  • Data warehouse workloads
  • High-performance computing applications

Potential use cases

This solution applies to Moodle deployments. Organizations that use Moodle span many industries, including education, business, IT, and finance.

Considerations

These considerations implement the pillars of the Azure Well-Architected Framework, which is a set of guiding tenets that can be used to improve the quality of a workload. For more information, see Microsoft Azure Well-Architected Framework.

Keep the following points in mind when you implement this solution.

Scalability

This solution scales up or down as needed:

Availability

For the Azure NetApp Files availability guarantee, see SLA for Azure NetApp Files.

Security

Security provides assurances against deliberate attacks and the abuse of your valuable data and systems. For more information, see Overview of the security pillar.

For all deployment options, you need to provide a valid Secure Shell (SSH) protocol 2 (SSH-2) RSA publicā€“private key pair. The length should be at least 2048 bits. Azure doesn't support other key formats such as ED25519 and ECDSA. For information about Azure NetApp Files security, see Security FAQs for Azure NetApp Files.

Resiliency

Azure NetApp Files is built on a bare-metal fleet of redundant, solid-state hardware. The service operates without interruption, even during maintenance operations. For more information about resiliency, see Fault Tolerance, High Availability, and Resiliency in Azure NetApp Files.

Disaster recovery

As Architecture explains earlier in this article, you can make the solution more resilient. You can provide disaster recovery by adding a secondary region and using Azure NetApp Files cross-region replication. This functionality efficiently replicates the NFS volumes to a secondary passive region. During the unlikely event of a complete region failure, the application runs in that secondary region.

Cost optimization

Cost optimization is about looking at ways to reduce unnecessary expenses and improve operational efficiencies. For more information, see Overview of the cost optimization pillar.

Consider a medium-sized to large-sized Moodle deployment of approximately 5,000 users with a 10 percent concurrency ratio. The recommended throughput for this case is about 500 MBps. You can build this type of system on a Linux-based Standard_D32s_v4 VM that uses 8 TB of P60 managed disk.

Azure NetApp Files offers a more cost-effective solution. It achieves the recommended throughput of 500 MBps but uses only 4 TB of Ultra service-level capacity. The Premium and Standard service levels are also often sufficient, further improving the cost effectiveness. Even when the scale of the application is larger and the application requires more Azure NetApp Files capacity, these service levels can likely deliver the recommended throughput.

Use the Azure pricing calculator to estimate the cost of the Azure resources that your implementation requires. For more information on Azure NetApp Files cost modeling, see Cost model for Azure NetApp Files.

For a calculator that computes the Azure NetApp Files performance and total cost of ownership (TCO), see Azure NetApp Files Performance Calculator. Use this calculator to find the optimal balance between capacity, performance, and cost.

Deploy this scenario

For a deployment guide for Moodle on Azure NetApp Files, see Azure NetApp Files for NFS storage with Moodle.

Contributors

This article is maintained by Microsoft. It was originally written by the following contributors.

Principal author:

Next steps

Product documentation: