九、哨兵模式

? 哨兵模式
– 主库宕机后,从库自动升级为主库
– 在slave主机编辑sentinel.conf文件
– 在slave主机运行哨兵程序
[root@db2 redis]# vim /etc/sentinel.conf
sentinel monitor db1 192.168.4.11 6379 1
[root@db2 redis]# redis-sentinel /etc/sentinel.conf
3420:X 06 Jul 22:10:14.808 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3420:X 06 Jul 22:10:14.808 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=3420, just started
3420:X 06 Jul 22:10:14.808 # Configuration loaded
3420:X 06 Jul 22:10:14.808 * Increased maximum number of open files to 10032 (it was originally set to 1024).

九、哨兵模式

 

 

3420:X 06 Jul 22:10:14.809 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
3420:X 06 Jul 22:10:14.813 # Sentinel ID is 1a3f9cadaf24db3c0d55ff22acbe77c24e84cc8e
3420:X 06 Jul 22:10:14.813 # +monitor master db1 192.168.4.11 6379 quorum 1

九、哨兵模式

上一篇:表格样式


下一篇:POJ 1887