haproxy not working. one node dead causes full failure

Hey,
While running HAProxy, my WebApp does not look to the second or third node when the first node fails.

I have the following setup:

[Percona XtraDB 1]
[Percona XtraDB 2] → [WebApp Server 1/HAproxy]
[Percona XtraDB 3]

WebApp server hosts HAproxy service. WebApp calls for 127.0.0.1 and the haproxy service chooses a node.

When node 1 is down(according to HAproxy with non-green status) , node 2 and 3 do not take priority.

I have HAproxy set to:



backend pxc-onenode-back
mode tcp
balance leastconn
option httpchk
server server1<.example.com> 192.168.35.11:3306 check port 9260 inter 12000 rise 3 fall 3
server server2<.example.com> 192.168.35.12:3306 check port 9260 inter 12000 rise 3 fall 3 backup
server server3<.example.com> 192.168.35.13:3306 check port 9260 inter 12000 rise 3 fall 3 backup

Cluster is 100% happy, but when one node goes down, the App does not choose the second node, it stays on the first node and just waits.

The manual fix is for me to edit the haproxy.conf and restarting the services. I make the following edit :

…rise 3 fall 3 backup
…rise 3 fall 3
…rise 3 fall 3 backup

essentially removing the first as a primary target.

Possible culprits:
xinetd services are wrong?
httpchk is not the option I am looking for. maybe mysqlcheck or something?
clustercheck fails on the App server, but works on the cluster nodes. maybe I need clustercheck to properly work on the App(haproxy hoster) and the percona cluster nodes?