Hardware Loadbalancer for Moodle

Hardware Loadbalancer for Moodle

by Bipin Das -
Number of replies: 3
Hello All,

I have a moodle server with following configurations.

Server : Dell Poweredge
CPU : Intel Xeon 8 CPU
Memory : 4GB
OS : Centos 5.2
Apache : 2.2.3
MPM : Prefork

Some of output in the peak time is as follows.I mean at the time of running quiz module OR assignments module.

netstat -tn | wc -l = 2122
netstat -tn | grep ESTABLISHED | wc -l = 33

Sometimes the server load shoots upto above 100 and it went hangs. So we decided to put a Hardware loadbalancer before moodle. To share this load between two nodes. Please recommend most people using H/W load balancer for this scenario. It will be great if somebody share his knowledge who already gone across this area.

Thanks in Advance
BipinDas.K




Average of ratings: -
In reply to Bipin Das

Re: Hardware Loadbalancer for Moodle

by Justin Haaga -
Your DB on the same server? If so this might be an easy step to reduce load.

Since you are running linux you might want to look into haproxy. This is a http/https load balancer. You could take your dell and virtulize it and setup 3 web servers. Or find some old servers and cluster them together and have your dell be the first webserver in line.

Alot of documentation out there on haproxy, it's free, fast and easy to configure. Just need some hardware.
In reply to Justin Haaga

Re: Hardware Loadbalancer for Moodle

by Bipin Das -
yes Justin,

DB is on the same server. We are planning to move a dedicated server to reduce the server load. And following is my Prefork conf. Is this enough for my above scenario ?


StartServers 15
MinSpareServers 5
MaxSpareServers 20
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000


Thanks.
BipinDas
In reply to Bipin Das

Re: Hardware Loadbalancer for Moodle

by Carlos Romero -
First of all, the memory seems low.

We are using two strategies successfully:

- Configure Apache to use all the resources it can permanently. As you are writing about quizes, it reminds me situations where a computer lab suddenly connects all its computers to moodle to do a quiz. In those situations the load of the server increases a lot creating Apache processes, but, if they (Apache processes) are already created the server performs much better. Set MaxSpareServers, ServerLimit and MaxClients to the same, according to your server memory ... 100. You'll see a big difference.

- Monitor your server performace permanently. We are using Zabbix www.zabbix.com. That way you can see on the same page graphics representing memory consumptions correlated to number of apache processes, number of moodle users, etc.