Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to setup a proof of concept based on MySQL galera.
My MySQL servers are all setup and working properly and replicating correctly, and I am now at the load-balancer level. I am using a pfsense box (firewall/gateway) in front of these mysql servers and I am trying to setup the load-balancer. Pfsense has a load-balancer service integrated and if I used the normal TCP check it works great, but I want more than that.

I installed an instance of apache2 on the mysql servers and this is running a php script that returns HTTP 200 if mysql is truly up and running or HTTP 503 in any other case. I can't get pfsense to use this script to monitor the status of the MySQL server though

So here is what I have done so far:

1) I created a specific monitor
Service -> Load-balancer -> Monitors: that has type HTTP in the host settings I am not even sure what should be there, I tried WAN ip, VIP and they both don't work

2) I created the servers pool
Service -> Load-balancer -> Pools: in this pool I have my 3 servers listening on port 3306 and I specified the monitor to be the one from step 1

3) I created my virtual server:
Service -> Load-balancer -> Virtual server: that is pointing to my WAN on port 3306

4) I openened my firewall to allow the port 3306 from any to any

Has I said I can make it work in a simple TCP load-balancer but I want to go with the HTTPcheck.

Any ideas how to set this up?

share|improve this question
According to this howto you seem to be doing everything right -- are you sure your PHP script is behaving correctly? –  voretaq7 Mar 6 '12 at 17:38
Yes I activated the PPTP VPN and I am able to browse the web server on the mysql servers. –  drivard Mar 6 '12 at 18:22
I finally end up installing pfsense package haproxy-full and now it is working fine the way I wanted. All configurations are made in the gui. –  drivard Mar 21 '12 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.