一、S_DOWN和O_DOWN
S_DOWN和O_DOWN两种宕机状态
(1)、S_DOWN是主观宕机,就一个哨兵如果自己觉得一个master宕机了,那么就是主观宕机<br> sdown达成的条件很简单,如果一个哨兵ping一个master,超过了is-master-down-after-milliseconds指定的毫秒数之后,就主观认为master宕机<br>
# 语法:sentinel down-after-milliseconds <master-name> <milliseconds>
# Number of milliseconds the master (or any attached replica or sentinel) should
# be unreachable (as in, not acceptable reply to PING, continuously, for the
# specified period) in order to consider it in S_DOWN state (Subjectively Down).
# 意思是任何从节点或者哨兵在指定的时间内,不能ping通主机就被认为成S_DOWN
(2)、O_DOWN是客观宕机,如果quorum数量的哨兵都觉得一个master宕机了,那么就是客观宕机
注意:S_DOWN到O_DOWN转换的条件很简单,如果一个哨兵在指定时间内,收到了quorum指定数量的其他哨兵也认为那个master是S_DOWN了,那么就认为是O_DOWN了
# 语法:sentinel monitor <master-name> <i