zoukankan      html  css  js  c++  java
  • Redis failover过程

          在Leader触发failover之前,首先wait数秒(随即0~5),以便让其他sentinel实例准备和调整。如果一切正常,那么leader就需要开始将一个salve提升为master,此slave必须为状态良好(不能处于SDOWN/ODOWN状态)且权重值最低(redis.conf中)的,当master身份被确认后,开始failover

        A)“+failover-triggered”: Leader开始进行failover,此后紧跟着“+failover-state-wait-start”,wait数秒。

        B)“+failover-state-select-slave”: Leader开始查找合适的slave

        C)“+selected-slave”: 已经找到合适的slave

        D) “+failover-state-sen-slaveof-noone”: Leader向slave发送“slaveof no one”指令,此时slave已经完成角色转换,此slave即为master

        E) “+failover-state-wait-promotition”: 等待其他sentinel确认slave

        F)“+promoted-slave”:确认成功

        G)“+failover-state-reconf-slaves”: 开始对slaves进行reconfig操作。

        H)“+slave-reconf-sent”:向指定的slave发送“slaveof”指令,告知此slave跟随新的master

        I)“+slave-reconf-inprog”: 此slave正在执行slaveof + SYNC过程,如过slave收到“+slave-reconf-sent”之后将会执行slaveof操作。

        J)“+slave-reconf-done”: 此slave同步完成,此后leader可以继续下一个slave的reconfig操作。循环G)

        K)“+failover-end”: 故障转移结束

        L)“+switch-master”:故障转移成功后,各个sentinel实例开始监控新的master。

  • 相关阅读:
    Troubleshooting a Jedis Connection Pool Error
    com.mysql.cj.jdbc.exceptions.CommunicationsException
    springboot tomcat连接池
    Spring官方文档
    Troubleshooting-Spring-RestTemplate-Requests-Timeout
    Linux进程和端口命令总结
    Git及GitLab使用手册
    MySQL数据库命令大全
    两天时间,实现自己的 Promise
    vue-cli3.0搭建服务端渲染SSR
  • 原文地址:https://www.cnblogs.com/moonandstar08/p/5001902.html
Copyright © 2011-2022 走看看