redis sentinel(哨兵)配置解读
1 port <sentinel-port> :哨兵实例运行所在的端口(默认26379)
2 sentinel announce-ip:哨兵将会在gossip hello消息中使用指定的ip地址,而不是自动发现的本地地址。
3 sentinel announce-port:哨兵会使用指定的端口
sentinel <announce-ip> <announce-port> 2) 3)没必要同时使用,可以单独使用
4 sentinel monitor <master-name> <ip> <Redis-port> <quorum> : 哨兵监控这个master,在至少quorum个哨兵实例都认为master down后把master标记为odown(objective down客观down;相对应的存在sdown,subjective down,主观down)状态。slaves是自动发现,所以你没必要明确指定slaves。master名字不能包含特殊的字符或者空格,合法的字符是a-z 0-9和'.''-''_'这个三个字符。
5 sentinel auth-pass <master-name> <password> : 设置master和slaves验证密码,在监控redis实例时很有用。如果你想监控masters和slaves而设置不同的密码,这样是达不到目的的。
6 sentinel down-after-milliseconds mymaster <milliseconds> : master或slave多长时间(默认30秒)不能使用后标记为s_down状态。
7 sentinel parallel-syncs <master-name> <numslaves> : 在failover期间我们可以重配slaves的个数(默认1个)
8 sentinel failover-timeout <master-name> <milliseconds(默认值3分钟)> : 使用方式:
1)相邻前后两次failover的时间间隔
2)slave错误的配置为master多长时间后重新配置
3)正在进行的failover,发现配置没变,多长时间后取消failover
4)slaves被配置为新master的slave后,多长时间后有可能被重新配置
9 scripts execution:sentinel notification-script和reconfig-script被用来在failover后通知管理员的配置脚本,执行规则如下:
1)如果脚本返回1退出,会重试(最大次数是10次)
2)如果脚本返回2退出,不重试
3)如果脚本收到一个信号终止,行为和1)相同
4)脚本有最大运行时间(60秒),超过这个限制,脚本会被一个sigkill终止并且会被重试
使用方法:
sentinel notification-script <master-name> <script-path>
redis sentinel(哨兵)配置解读的更多相关文章
- Redis Sentinel哨兵配置
概述 Redis-Sentinel是Redis官方推荐的高可用性(HA)解决方案,当用Redis做Master-slave的高可用方案时,假如master宕机了,Redis本身(包括它的很多客户端)都 ...
- Redis的主从复制与Redis Sentinel哨兵机制
1 Redis的主从复制 1.1 什么是主从复制 持久化保证了即使redis服务重启也不会丢失数据,因为redis服务重启后会将硬盘上持久化的数据恢复到内存中,但是当redis服务器的硬盘损 ...
- 【转载】Redis Sentinel服务配置
转载地址:http://blog.csdn.net/vtopqx/article/details/49247285 redis官网文档:http://www.redis.cn/topics/senti ...
- Redis sentinel 哨兵模式集群方案配置
第一个方案是创建 redis cluster,第二种方案就是用哨兵模式来进行主从替换以及故障恢复.兵模式集群方案配置 一.sentinel介绍 Sentinel作用: 1):Master状态检测 2) ...
- Redis 5 配置 Redis sentinel(哨兵模式)
先了解一下哨兵都 做了什么工作:Redis 的 Sentinel 系统用于管理多个 Redis 服务器(instance), 该系统执行以下三个任务: * 监控(Monitoring): Sentin ...
- Redis Sentinel哨兵集群
Redis Sentinel(哨兵集群)是一种高可用的redis部署方案.在集群中的redis-master服务挂掉时,无需人为干预,即可通过哨兵集群的自我调整,实现redis服务的持续可用. 哨兵集 ...
- Redis sentinel 哨兵模式
一.sentinel介绍 Sentinel作用: 1):Master状态检测 2):如果Master异常,则会进行Master-Slave切换,将其中一个Slave作为Master,将之前的Maste ...
- 【Redis】Redis Sentinel 哨兵模式搭建
Redis Sentinel介绍 Redis Sentinel是Redis的官方高可用性解决方案 Redis Sentinel为Redis提供高可用性.实际上,这意味着使用Sentinel可以创建一个 ...
- centos8平台redis5的主从同步搭建及sentinel哨兵配置
一,规划三台redis的ip:一主二从 redismaster01: 172.18.1.1 主 redisslave01: 172.18.1.2 从 redisslave02: 172.18.1.3 ...
- Redis:Sentinel哨兵
简介 Sentinel的作用就是主从切换:Redis-Sentinel是Redis官方推荐的高可用性(HA)解决方案,当用Redis做Master-slave的高可用方案时,假如master宕机了,R ...
随机推荐
- 小白学phoneGap《构建跨平台APP:phoneGap移动应用实战》连载一(PhoneGap中的API)
之前本博连载过<构建跨平台APP:jQuery Mobile移动应用实战>一书.深受移动开发入门人员的喜爱. 从如今開始,连载它的孪生姐妹书phoneGap移动应用实战一书,希望以前是小白 ...
- 最新ssh2构架
构架要求: 1.最新ssh2jar包. 2.使用全注解. 3.给锁机制 4.缓存. 5.使用权限构架. 6. 前台构架用bootstraps. 今天任务: 搭建php环境.看代码.整理ssh2架构. ...
- Jenkins和Maven构建持续集成
真是运维的福利,不用在敲Linux命令了 须要的工具:Linux或window.Jenkins.tomcat7.Jdk.maven.项目部署的war包 1.首先从Jenkins官网下载最新的Jenki ...
- 《UNIX-Shell编程24学时教程》读书笔记Chap1,2 Shell基础,脚本基础
Chap1 Shell基础 知道该使用哪种命令是依赖于经验的.----惟手熟尔. 1.1 什么是命令 其实知道这些名词好像也没什么帮助,嘻嘻 1.2 什么是Shell 不同用户不同的提示符:不同的环境 ...
- 显卡接口PCI、VGA、PCIE
转:1.PCIe扫盲系列博文连载 2.http://blog.sina.com.cn/s/blog_a73f94190102w2j2.html 1.AGP(Accelerated Graphics P ...
- MEMS--微机电系统
http://baike.baidu.com/view/95221.htm?fromtitle=MEMS&fromid=686299&type=search 微机电系统 编辑 您检 ...
- 整理自Git文件夹下资料及man手册(不包括书籍)
$ git commit -awhich will automatically notice any modified (but not new) files, add them to the ind ...
- [RFC] Simplifying kernel configuration for distro issues
http://lwn.net/Articles/507276/ From: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b-A ...
- __del__删除方法
class dog: def __del__(self): print("删除机制被调用了...") dog1 = dog() del dog1 #在这里是先删除掉了,所以就去上面 ...
- PHP中使用Redis
Redis是什么 Redis ( REmote DIctionary Server ) , 是一个由Salvatore Sanfilippo写的key-value存储系统. Redis是一个开源的使用 ...