Have gotten 2 Redis instances installed, with one being a master. That is working remarkably well and with no headaches.

I'm now trying to get my HAProxy/keepalived nodes to handle some sort of failover.

1) Is that even possible - setting up a node as the master and the other as backup? This is what I am doing with my MySQL nodes:

        server check backup
        server check

2) If so, is there updated documentation on this? I've followed the documentation on the HAProxy's blog, as referenced below:

ServerFault article: Redis sentinel + HAProxy failover

But the nodes are showing up as down, even though I can use them via the CLI and other clients:

snapshot of failed Redis nodes in HA Proxy web interface

Using the CLI, if I issue the commands in the tcp-checks, the responses match the expected returns in the conf. (note: we don't have authentication turned on yet on the Redis nodes).

Here's my haproxy.cfg - starting with last line of my MySQL section

        server check 

defaults REDIS
        mode tcp
        timeout connect  4s
        timeout server  30s
        timeout client  30s

frontend ft_redis
        bind *:6379 name redis
        default_backend bk_redis

backend bk_redis
        option tcp-check
        tcp-check send PINGrn
        tcp-check expect string +PONG
        tcp-check send info replicationrn
        tcp-check expect string role:master
        tcp-check send QUITrn
        tcp-check expect string +OK
        server Site2DB3 check inter 1s
        server Site1DB3 check inter 1s

3 Answers 3


should read


Same for the other tcp-check messages. You're sending PINGrn instead of PING\r\n, an invalid command which will throw an error and thus cause your UP check to fail.


Also make sure you escape spaces after the tcp-check send like:

tcp-check send info\ replication\r\n

For REDIS that has authentication, add this :

tcp-check send AUTH\ xxx_xxx\r\n

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .