Installing Moodle on different VMs with load balancer mission

Installing Moodle on different VMs with load balancer mission

by Ahmed Ibrahim -
Number of replies: 5

Hello dears

I am having 2 servers, each one contains 3 different ubunto virtual machines and I would like to have a tutorial that can help me in installing moodle on them to achieve the following:

1- Front end is installed on one server on two VMs and the second server will be a mirror of the first server

2- DB will be installed on other VM 

I need to do this mission, and add a load balancer, so are there any helpful tutorial that can help me in that?

Also from your point of view what is the last stable release you suggest to be installed?

Thanks in advance

Average of ratings: -
In reply to Ahmed Ibrahim

Re: Installing Moodle on different VMs with load balancer mission

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Moodle web server 1 -------
                            \
                              ---- Database server, File server, Cache server
                            /
Moodle web server 2 -------

So....  you need two web servers which (mostly ) just have the Moodle code and *identical* config.php files. The database server (pointed to by the database setting in config.php), the 'moodledata' files area ($CFG->dataroot) and the cache (Moodle's MUC/Cache settings) *must* all be shared. 

See Performance_recommendations and Caching

I have not discussed a load balancer but that could be just "round robin" DNS or anything you like. 

Do NOT skip the caching bit. By default Moodle writes cache files to the files area. As shared files resources tend to be orders of magnitude slower than local disk it would result in very poor performance. 

Also check settings in config.php - see https://github.com/moodle/moodle/blob/MOODLE_35_STABLE/config-dist.php#L432

You should always run the latest stable version of Moodle and update regularly. 

You need to monitor and tune all this stuff so it works effectively (and was worth all the bother)

Average of ratings: Useful (3)
In reply to Howard Miller

Re: Installing Moodle on different VMs with load balancer mission

by Ahmed Ibrahim -

Aren't there any step by step tutorial link for making the needed task?

In reply to Ahmed Ibrahim

Re: Installing Moodle on different VMs with load balancer mission

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Don't take this the wrong way... but if you need a tutorial to set this sort of thing up then you might be better approaching a Moodle Partner who is familiar with this sort of installation. 

I have given you the basic idea, but no two installations of this type will be alike. You really need to know what you are doing. 

For example, we haven't asked you *why* you want to do this...

Average of ratings: Useful (1)
In reply to Ahmed Ibrahim

Re: Installing Moodle on different VMs with load balancer mission

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
See also "Questions about load balancing methods and the session cache" https://moodle.org/mod/forum/view.php?id=596.