In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Why does a redis cluster need at least 6 nodes? 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.
Think about it, you can create a redis cluster through redis-trib.rb, and then use the number followed by-- replicas to indicate that one master node corresponds to several slave nodes, so I did the following test.
The effect you want to achieve is that there are 6 nodes, then 2 master nodes, and each master node corresponds to 2 slave nodes, which is exactly 6 nodes, but an error is reported during execution:
[aiprd@hadoop2 src] $. / redis-trib.rb create-- replicas 2 192.168.30.10 Vol 7000 192.168.30.11 RV 7003 192.168.30.10 Rd 7002 192.168.30.10 Rd 7002 192.168.30.11 Rd 7004 192.168.30.11 Rd 7005
> Creating cluster
* * ERROR: Invalid configuration for cluster creation.
* Redis Cluster requires at least 3 master nodes.
* This is not possible with 6 nodes and 2 replicas per node. # explains that for 6 nodes, it is impossible to have 3 master, each with 2 replica nodes. Because that kind of structure requires nine nodes.
* At least 9 nodes are required. # at least 9 nodes are required.
The above information means that the Redis cluster needs at least 3 master nodes, so now there are a total of 6 nodes, so it can only be the way that 1master corresponds to 1slave.
So:
1MasterMel 1slaveRedis cluster needs 6 nodes
1masterly2slaverecoveryredis cluster needs 9 nodes, and so on.
For more information:
Why the maximum number of slots in a redis cluster is 16384
Why should redis sentinel Cluster have more than 3 nodes?
This is the answer to the question about why the redis cluster needs at least 6 nodes. 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.