Redis 集群

阅读 134

2022-03-12

#配置主master节点ip port
replicaof 192.168.2.207 6379
#主节点密码
masterauth 123456

推荐:Redis-Desktop-Manager 工具,是真的好用。


sentinel.conf:

daemonize yes 
logfile "/opt/redis-6.2.6/sentinel.log" 
//监控主,设置哨兵1
sentinel monitor mymaster 192.168.2.207 6379 1
//设置连接密码 
sentinel auth-pass mymaster 123456 
//多长时间ping不通,设置主观down
sentinel down-after-milliseconds mymaster 10000 
//多长时间master仍没活过来,则启动failover,认为客观down,
//从剩下的slave中选一个升级为master
sentinel failover-timeout mymaster 10000 

日志:tail -f sentinel.log
2

精彩评论(0)

0 0 举报