Clustering Moodle on Multiple Servers for High Availability and Scalability

August 12, 2014 By Severalnines

Moodle is an open-source e-learning platform (aka Learning Management System) that is widely adopted by educational institutions to create and administer online courses. For larger student bodies and higher volumes of instruction, moodle must be robust enough to serve thousands of learners, administrators, content builders and instructors simultaneously. Availability and scalability are key requirements as moodle becomes a critical application for course providers. In this blog, we will show you how to deploy and cluster moodle/web, database and file-system components on multiple servers to achieve both high availability and scalability. 

 

We are going to deploy moodle on top of GlusterFS clustered file system and MariaDB Galera Cluster 10. To eliminate any single point of failure, we will use three nodes to serve the application and database while the remaining two are used for load balancers and the ClusterControl management server. This is illustrated in the following figure:

 

Prerequisites

 

All hosts are running on CentOS 6.5 64bit with SElinux and iptables disabled. The following is the host definition inside /etc/hosts:

192.168.197.100    moodle web db virtual-ip mysql
192.168.197.101         moodle1 web1 db1
192.168.197.102         moodle2 web2 db2
192.168.197.103         moodle3 web3 db3
192.168.197.111         lb1
192.168.197.112         lb2 clustercontrol

 

read more