In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How does redis cluster solve the problem of brain fissure? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
What is redis's clustered brain fissure?
The cluster brain fissure of redis means that due to network problems, the redis master node is in a different network partition from the redis slave node and the sentinel cluster. At this time, because the sentinel cluster is unable to perceive the existence of master, the slave node is promoted to master node.
There are two different master nodes, just like a brain split into two.
In the cluster brain crack problem, if the client continues to write data based on the original master node, then the new master node will not be able to synchronize the data. When the network problem is solved, the sentinel cluster will reduce the original master node to the slave node, and then synchronize the data from the new master, which will result in a large amount of data loss.
Solution
There are two parameters in the configuration file of redis
Min-slaves-to-write 3min-slaves-max-lag 10
The first parameter represents the minimum number of slave connected to the master
The second parameter represents the maximum delay time for slave to connect to master
If the number of slave connected to the master is less than the first parameter, and the delay time of the ping is less than or equal to the second parameter, then the master will reject the write request. After configuring these two parameters, if the cluster brain fissure occurs, the original master node will reject the write request from the client, which can reduce the data loss after data synchronization.
Note: the parameters in the newer version of redis.conf file become
This is the answer to min-replicas-to-write 3min-replicas-max-lag 10 about how to solve the problem of brain fissure in redis cluster. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.