首页 > 其他 > 详细

九、哨兵模式

时间:2021-07-07 12:55:16      阅读:35      评论:0      收藏:0      [点我收藏+]

? 哨兵模式
– 主库宕机后,从库自动升级为主库
– 在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

九、哨兵模式

原文:https://www.cnblogs.com/momo6656/p/14980362.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!