Moodle + HAProxy health check page?

Moodle + HAProxy health check page?

by Matt Rice -
Number of replies: 3

We are using HAProxy to load-balance our Moodle installation and we would like some suggestions:

Currently, we have HAProxy set up to ask for $ourmoodlesite.com/index.php every 2 seconds on each node of our cluster (so that HAProxy can automatically direct traffic to functioning nodes); is there a better page to ask for (other than the frontpage)? For example, there is a specific URL for Blackboard to use (http://<server>/webapps/portal/healthCheck or some such) for exactly this purpose.

Currently running Moodle 2.6; will be upgrading to Moodle 2.8 in the near future.

Average of ratings: -
In reply to Matt Rice

Re: Moodle + HAProxy health check page?

by Brendan Heywood -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I recently made an admin tool used by elastic load balancer to test this for a cluster:

https://github.com/brendanheywood/moodle-tool_heartbeat

It tests that each node exists, can bootstrap moodle and can see it's sitedata and can connect to memcache:

https://github.com/brendanheywood/moodle-tool_heartbeat/blob/master/index.php

Average of ratings: Useful (1)
In reply to Matt Rice

Re: Moodle + HAProxy health check page?

by Humberto Keymur -

Hi Matt

Im using HA proxy, but HaProxy close moodle sesion every 4 minutes and all users need to login again every 4 minuts. There are no probems with the timeout change this values and no have efect.

can you share with my your configuration??