Redis failover with 1 master 2 slave with haproxy authentication

19 views
Skip to first unread message

Mohammed Alam

unread,
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 172.16.90.206:9292 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 172.16.90.206:9291 check inter 3s
        server redis-207 172.16.90.207:9291 check inter 3s
        server redis-212 172.16.90.212:9291 check inter 3s





Redis conf

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