We are happy with our moodle setup for several years but now have the opportunity to revisit and redesign the platform to be more "enterprise-like". We would be looking at things like load balancing, failover (if one application or database server fails, the other node, will become the master, etc.). We don't need clustering as we're not that big.
We will have the application server on a vm machine and another for the db server.
We will be on VMWare platform. Using RedHat 7 Enterprise, the PHP that comes with it and now a paid subscription to use MySQL Enterprise.
It will probably be a software based load balancer.
Without much experience in this field, this is an exciting opportunity to build something new.
Any recommendations as to how this platform should be built? Can you share your set up with us?
What is your current setup? I looked at doing this a while back and if you are moving from a single machine with moodle and files and database on it, there are some performance penalties in going to a load balancing setup because the files now have to be stored on the network as opposed to directly with the machine and you incur network access time penalties in database access also. There's a lot of additional complexity that you take on, so make sure your IT team is ready for it and the ongoing maintenance that would be required.
We ended up going with the below setup also using VMWare and CentOS 7 with MariaDB, so essentially the same just non-paid versions of DB and OS:
Moodle on a dedicated web vm - 10 vCPU - 32 GB ram, 200 GB Disk thin provisioned (backing storage on the ESXi hosts is a raid 5 of SSDs) - this hardware configuration is a bit overkill for our purposes but since we have been scaling up fast it's been a boon for us. Moodledata is directly on a partition in this VM, so it's locally accessed.
MariaDB Master server on another vm - 10 vCPU - 64 GB ram - 200 GB disk thin provisioned also. We configured buffer pool size to be 16 GB so that it can hold our entire DB in memory. This server also holds SQL databases for a number of other applications (Wordpress and other misc.)
Replication is configured on the master server to replicate to a second replication MariaDB server located on another ESXi Host. Moodledata is backed up daily to tape and another machine via http://rsnapshot.org/.
If something goes wrong with the master database, we manually edit the moodle configuration file and point it to the replication database.
If something goes wrong with the web server, we have a documented procedure on how to rebuild it and copy in the data (in my experience, this can be done in under 2-3 hours).
My biggest recommendation would be to really look carefully at what solution you will use for sharing moodledata between your load balanced web servers and test it's speed. If it's not fast enough, you'll want to do a lot of caching to minimize the need to go to file storage access.
Our production moodle servers have their own VM with PM running on Xeon(R) CPU E5-2640 @ 2.50GHz (16 GB ram) & PD running on Xeon(R) CPU X5675 @ 3.07GHz .
Each production server have their own local drive installed w/ RHEL 6.8 (Santiago) 64-BIT OS, PHP 5.6.25 and Apache/2.4.6 (Red Hat) with Moodle 3.2.4+ Build 20170810 - 2016120504.06 weekly build.
The database is stored on 2 LUNs connected to SAN – MySQL db (60 GB) and another for MoodleData (1 TB).
The MySQL’s database engine is innoDB.
Separating the disk I/O from the application, DB, and data over different drives should provide improved performance.
64-Bit RHEL 6.8 (Santiago), PHP 5.6.25 (PM)/(PD), MySQL 5.5.41(PM) / 5.5.52 (PD) Source Distribution.
Needless to say the database should be on its own server and not competing for the computing resources as that in the application server. This is something we will change.