redis sentinel 설치 on Centos 8
뭐가 문제인지 Virtualbox 3대로 아무리 테스트해봐도 안되다가 /etc/redis-sentinel.conf 를 null로 날리고 아래 내용만 깔끔하게 넣었다 근데 된다. failover 잘된다. ㅠ.ㅠ bind 0.0.0.0 port 26379 sentinel monitor mymaster 192.168.56.201 6379 2 sentinel down-after-milliseconds mymaster 5000 sentinel parallel-syncs mymaster 1 sentinel failover-timeout mymaster 180000 sentinel auth-pass mymaster 비번 daemonize yes pidfile /var/run/sentinel.pid logfile /var/log/redis/sentinel.log ============== /etc/redis.conf에 아래 내용 반드시 넣자 mastersauth 비밀번호 requirepass 비빌번호 ================= 1번서버에서 redis-cli auth 비번 info replication 하면 아래와 같이 마스터로 보인다 이상태에서 shutdown 하거나 서버를 끄거나 systemctl stop redis 하거나 하면 마스터가 죽고 2번이나 3번 서버에서 tail -f /var/log/redis/sentinel.log 를 보면 failover 되는것이 보인다