Cluster shared storage

Cluster shared storage

Daniel Nor發表於
Number of replies: 5
We are configuring a clustered Moodle setup with separate loadbalanced PHP and NGINX nodes. Running hardware database cluster to connect it.
The question comes down to the shared storage. NFS seems to be not reccomended, and it is very slow. What is the alternatives reccomended by Moodle?
評比平均分數: -
In reply to Daniel Nor

Re: Cluster shared storage

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
I'm not sure why you think NFS is not recommended. NFS is fine. However, don't rely on it for anything performance critical. This is likely to come down to the Moodle Cache. Implement a Redis server for that and you should be fine.
In reply to Howard Miller

Re: Cluster shared storage

Daniel Nor發表於
Thank you for your feedback. What do you mean by "performance critical". If it is, what should you rely on? It will be used to hosting alot of clients and we are in need of a performant and redundant setup.
We experience alot of read and write when using NFS, slowing everything down. Does this come down to Moodle Caching?
In reply to Daniel Nor

Re: Cluster shared storage

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
Sorry if I wasn't clearer. Moodle relies heavily on caching. By default, it will use files in wherever your 'moodledata' resides. If this is NFS then, yes, your site will probably be very slow. For anything beyond a trivial site you should implement a "proper" cache. There are alternatives but Redis is well-used and does a good job.

Once you have that in place, NFS should be absolutely fine. Even for very large sites. 
In reply to Daniel Nor

Re: Cluster shared storage

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
The point is Moodle reads and writes to many places. Some are critical for scalability others not. For example moodledata/filedir is not critical. All sorts of caches are. So to get the maximum from the hardware you need to distribute those places accordingly.

That was about performance. Redundancy is a different topic, a harder one IMO.

In reply to Daniel Nor

Re: Cluster shared storage

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
More documentation can be found in the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596, for example Server cluster. Make use of the Advanced forum search on this site https://moodle.org/mod/forum/search.php?id=5.

P.S. This used to be a topic in the Hardware and performance forum. It was reported there that a new group, a Matrix group(?), is now in charge.