When to build a server cluster for Moodle (with examples)?

When to build a server cluster for Moodle (with examples)?

by Visvanath Ratnaweera -
Number of replies: 12
Picture of Particularly helpful Moodlers Picture of Translators
There are bunches of discussions on server clusters for Moodle. But I haven't seen a discussion answering when to make the move (from a single powerful server or a web- database server couple) to a server cluster. How do you decide? What is the architecture you've chosen?

- "Moodle Clustering" https://moodle.org/mod/forum/discuss.php?d=57202

- "Memcache issues in a clustered environment" https://moodle.org/mod/forum/discuss.php?d=319341

- "IIS Server clustering" https://moodle.org/mod/forum/discuss.php?d=315569

- 'Moodle 2.8.1. Server Cluster configuration. Apache Crashing with "exit signal Bus error (7)"' https://moodle.org/mod/forum/discuss.php?d=316323

- "NFS and Memcached configuration (clustering preparation)" https://moodle.org/mod/forum/discuss.php?d=310501

- "Setup a MySQL cluster for Moodle" https://moodle.org/mod/forum/discuss.php?d=214680

- "Moodle 2.6 cluster + NFS v4" https://moodle.org/mod/forum/discuss.php?d=254470

- "Server Clustering recommendations M2.6" https://moodle.org/mod/forum/discuss.php?d=251547

- "Hardware Sizing with Cluster Service" https://moodle.org/mod/forum/discuss.php?d=245123

(and many more)

From Moodle Docs:
- https://docs.moodle.org/en/Server_cluster

- https://docs.moodle.org/dev/Server_clustering_improvements_proposal
Average of ratings: Useful (5)
In reply to Visvanath Ratnaweera

Re: When to build a server cluster for Moodle (with examples)?

by Albert Ramsbottom -

As you may be aware some of those discussions were started by me so here is my ten pence worth smile

I have done this many times on multiple platforms and in my opinion the discussions always starts with performance and end up with resilience

Whilst I have seen increases in performance, they are often slight

When it concerns resilience, then the benefits are obvious in terms of up-time, but there are issues with adding extra layers of complexity

Its essential that this can be managed in house, otherwise "there may be trouble ahead"

Cheers




In reply to Albert Ramsbottom

Re: When to build a server cluster for Moodle (with examples)?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Thanks for the reply. My primary question was though, "when to make the move (from a single powerful server or a web- database server couple) to a server cluster". "When" in the sense of how many simultaneous users doing a quiz, for example, or the a total number of users and a percentage of max. logged-in users at a given time.
In reply to Visvanath Ratnaweera

Re: When to build a server cluster for Moodle (with examples)?

by Albert Ramsbottom -

Right!

I am not sure there is an answer to that question as every hardware or VM server has different specs and differing network latency etc

For instance one org that i worked for had a single server with 16 quad core 2.8Ghz processors and 384GB RAM

They had decided that theirmoodlewas slow and I proved it wasn't, so they then wanted resilience so I halved their server power but doubled the servers from one to two.



In reply to Albert Ramsbottom

Re: When to build a server cluster for Moodle (with examples)?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Yes, we have to take virtualisation out as a factor.

Now, your super power single server "16 quad core 2.8Ghz processors and 384GB RAM", how much did it deliver? And the how much the duo (web and database seperated?) of half the the deliver? Once we have those numbers, we can say, for anything beyond one needs a cluster.
In reply to Visvanath Ratnaweera

Re: When to build a server cluster for Moodle (with examples)?

by Albert Ramsbottom -

Hi

Well without digging out my Jmeter load testing results I cant tell you directly, other than the server was sufficient for 22000 students, with at any one time during the day, around 170 students connected and peeking at 800 on essay submission times

I remember we found that anymore than 250 students undertaking a quiz would cause the server to slow down but not crash

When we load balanced between two servers the performance was around 80% of the single server. We think this may have been due to network latency or disk usage.  We had local Moodle application folders, with local cache's, local and a shared main cache and a shared Moodle-data folder across a SAN using OCFS2

I believe that the performance drop was some OCFS2 latency

I honestly believe that Moodle.org havent ever quite got this together using Linux, because when I used Windows last year for a similar system, it worked way better, more reliable and much much quicker, but more importantly it was much easier to set up and manage

I will see if I can dig up some more detailed info

Albert



Average of ratings: Useful (1)
In reply to Albert Ramsbottom

Re: When to build a server cluster for Moodle (with examples)?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Albert

You wrote:
> the server was sufficient for 22000 students, with at any one time during the day, around 170 students connected and peeking at 800 on essay submission times
>
> I remember we found that anymore than 250 students undertaking a quiz would cause the server to slow down but not crash

Thanks for the numbers. So a single server was just capable of delivering that much output. And for more you need clustrting.
In reply to Albert Ramsbottom

Re: When to build a server cluster for Moodle (with examples)?

by Daniel Tran -

Hi Albert,

Did you ever figure out the cause of performance hit with the load balanced implementation ?.

Are you now using a single server setup ?

In reply to Daniel Tran

Re: When to build a server cluster for Moodle (with examples)?

by Albert Ramsbottom -

No not really, but clustering is mainly for resilience rather than performance

I move around building Moodle clusters for organisations.

What I am trying to say here is that there will always be a performance hit when sharing or replicating the Moodle data folder. So if you have 1 server with x amount of resources and then you split the same resources in to two servers you will only get 70% of the one

So just bung more resources at it smile

Albert

Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: When to build a server cluster for Moodle (with examples)?

by Michael Penney -

We use separate db from apache - started doing that in 2005 at Cal State and still find that the simplest if possible. Right now we have 59k users, and up to ~5000 taking quiz at about the same time. We had a dual apache cluster, but it was slower and more trouble. SSDs on the db server. 

Average of ratings: Useful (3)
In reply to Michael Penney

Re: When to build a server cluster for Moodle (with examples)?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

My advice is to go for clustering only when you are absolutely definitely certain you cannot do it on a single setup. The biggest performance benefit I ever extracted from Moodle was to go from a cluster back to a single (virtual) web server with the database on another machine. The other bit of advice is that if you are doing high stakes quizzing, do it on a separate system.


Average of ratings: Useful (3)
In reply to Marcus Green

Re: When to build a server cluster for Moodle (with examples)?

by Albert Ramsbottom -

I agree

I have never seen any performance gains from clustering, only resilience

It is possible to get a cluster to work better than a single but you have to throw more resources at it than the single set up, so it ends up costing more for similar performance

I can however say that many many organisations have policies in place that dictate load balanced clustering for resilience.  Every organisation I go to now want there Moodle clustered, buzz work probably

Cheers



Average of ratings: Useful (1)
In reply to Marcus Green

Re: When to build a server cluster for Moodle (with examples)?

by Luis de Vasconcelos -

Marcus, where did you put Moodledata? On that same Moodle server? And on the same drive?

So Apache, the Moodle code and Moodledata were all on one virtual server. Only MySQL was on a different server?

Thanks.