redis集群:哨兵模式集群环境

参考:

https://mp.weixin.qq.com/s/D1E07uaQT5973Mjg-IY9-g

Redis哨兵模式(sentinel)学习总结及部署记录(主从复制、读写分离、主从切换)

 

Centos2  10.3.12.131
服务端口:6379 哨兵模式端口:26379
Centos3  10.3.12.130
服务端口:6379   哨兵模式端口:26379
服务端口:6479  哨兵模式端口:26479

10.3.12.130

redis-6379.conf

daemonize yes
port 6379
logfile ./redis-6379.log
dir ./
bind 127.0.0.1 10.3.12.130
slaveof 10.3.12.131 6379
slave-read-only yes

 

redis-6479.conf

daemonize yes
port 6479
logfile ./redis-6379.log
dir ./
bind 127.0.0.1 10.3.12.130
slaveof 10.3.12.131 6379
slave-read-only yes

 

sentinel-26379.conf

port 26379
daemonize yes
logfile "26379.log"
dir ./
bind 0.0.0.0
sentinel monitor mymaster 10.3.12.131 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1

sentinel-26479.conf

port 26479
daemonize yes
logfile "26479.log"
dir ./
bind 0.0.0.0
sentinel monitor mymaster 10.3.12.131 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1

 

10.3.12.131

redis-6379.conf

daemonize yes
port 6379
logfile ./redis-6379.log
dir ./
bind 127.0.0.1 10.3.12.131

sentinel-26379.conf

port 26379
daemonize yes
logfile "26379.log"
dir ./
bind 0.0.0.0
sentinel monitor mymaster 10.3.12.131 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1

 

posted @ 2019-12-09 10:57  弱水三千12138  阅读(205)  评论(0编辑  收藏  举报