In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Do not understand the method of Redis cluster failover? In fact, it is not difficult to solve this problem. Let the editor take you to learn how to solve it. I hope you will gain a lot after reading this article.
The method of Redis cluster failover: 1. Elect a new master from all slave nodes; 2. The elected new master will execute slaveof no one to change his state from slave to master;3, revoke the slot assignment of the offline master node, and reassign these slots to himself.
The method of Redis cluster failover:
First, fault detection
-1. All nodes in the cluster will send PING messages to other nodes. When no corresponding PONG message is received within the specified time, the node will be marked as suspected offline.
-2. The PING messages sent will carry the information of the current cluster and nodes. In this way, the survival of the nodes can be detected and the unity of the cluster information can be maintained, but there is a certain degree.
Delay of
-3. It is suspected that the referral is not a real referral, but only if the following conditions are met.
-more than half of the primary nodes that are assigned slot slots think that this node is suspected to be offline before it can be offline.
-4. When a node learns through a message that the suspected offline vote of a node has exceeded half of the cluster, it will send a broadcast message indicating that the node is offline.
-5. After receiving the broadcast that a node has gone offline, other nodes modify their own internal cluster maintenance information to the offline state of the node.
II. Failover
-1. Elect a new master from all slave nodes
-2. The elected new master will execute slaveof no one to change his status from slave to master.
-3. Revoke the slot assignment of the offline primary node and reassign these slots to yourself
-4. The new master node broadcasts a PONG message to the cluster, telling all cluster nodes that they have become the master node and have taken over the original master node.
-5. The new master node begins to receive and process command requests related to its own slot.
Thank you for reading this article carefully. I hope it will be helpful for everyone to share the methods of Redis cluster failover. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.