Redis failover with 1 master 2 slave with haproxy authentication

Skip to first unread message

Mohammed Alam

Sep 1, 2021, 6:51:40 AMSep 1
to Redis DB
Dear Team,

We are trying to setup 1 master 2 slave with sentinel redis and haproxy on centos 7 but failover not happening through haproxy authentication which we have given password on redis configuration. Please any one help us to setup redis master slave with sentinel on centos 7 with haproxy authentication.

defaults REDIS
        mode tcp
        timeout connect 3s
        timeout server 6s
        timeout client 6s
        option  log-health-checks

listen stats
        bind *:1936
        mode            http

        stats enable
        stats hide-version
        stats refresh 5s
        stats show-node
        stats uri  /haproxy?stats

# redis block start

frontend front_redis
        bind name redis
        mode tcp
        default_backend redis_cluster

backend redis_cluster
        option tcp-check
        tcp-check connect
        #tcp-check send AUTH\ 2822dbbd71fa5d8e03440e78c66dab16dbe085c4\r\n
        tcp-check send PING\r\n
        tcp-check expect string +PONG
        tcp-check send info\ replication\r\n
        tcp-check expect string role:master
        tcp-check send QUIT\r\n
        tcp-check expect string +OK

        server redis-206 check inter 3s
        server redis-207 check inter 3s
        server redis-212 check inter 3s

Redis conf

protected-mode yes
port 9291
daemonize yes
requirepass 8316f2fd7a2abd13b19acfc545a8e9a21e4056171f43d669ca57bedd36d703ca
pidfile "/var/run/"
logfile "/var/log/redis_9291.log"
dir "/var/lib/redis/9291"
tcp-keepalive 300
timeout 0
Reply all
Reply to author
0 new messages