# haproxy not working. one node dead causes full failure

**URL:** <https://forums.percona.com/t/haproxy-not-working-one-node-dead-causes-full-failure/3014>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [October 18, 2013, 1:36pm UTC](https://forums.percona.com/t/haproxy-not-working-one-node-dead-causes-full-failure/3014 "2013-10-18T13:36:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedmands](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jedmands](https://forums.percona.com/u/jedmands)\
**Post date:** [October 18, 2013, 1:36pm UTC](https://forums.percona.com/t/haproxy-not-working-one-node-dead-causes-full-failure/3014/1 "2013-10-18T13:36:29Z")

</div>

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?
