标签:nbsp sla amp lov second mil timeout red sync
角色 ip port
master 127.0.0.1 6379
slave-1 127.0.0.1 6380
slave-2 127.0.0.1 6381
sentinel-1 127.0.0.1 26379
sentinel-2 127.0.0.1 26380
sentinel-3 127.0.0.1 26381
分别在 /etc/redis_6380.conf 和/etc/redis_6381.conf 文件加入如下参数,使6380和6381成为6379的从库
slaveof 127.0.0.1 6379
vi /etc/redis_sentinel_26379.conf
port 26379
daemonize yes
dir /data/redis/26379/
logfile "26379.log"
sentinel monitor mymaster 127.0.0.1 6379 2
sentinel down-after-milliseconds mymaster 30000
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 180000
redis_sentinel_26380.conf 和 redis_sentinel_26381.conf 配置类似
启动sentinel节点
redis-sentinel /etc/redis_sentinel_26379.conf &
redis-sentinel /etc/redis_sentinel_26380.conf &
redis-sentinel /etc/redis_sentinel_26381.conf &
标签:nbsp sla amp lov second mil timeout red sync
原文地址:https://www.cnblogs.com/liang545621/p/9522165.html