Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why redis cluster requires at least 3 master nodes [closed]

Tags:

redis

The cluster spec(http://redis.io/topics/cluster-spec) does not give a reason for this requirement. I guess it is because both the failure detection and the failover process require the majority of master nodes to reach an agreement. If we have only 2 masters and one failed, the other master node cannot make up the decision according to the protocol. Is this correct?

like image 793
hui.gao Avatar asked Dec 30 '15 06:12

hui.gao


People also ask

How many nodes can a Redis cluster have?

Amazon ElastiCache for Redis now allows you to scale your Redis Clusters up to 500 nodes. Redis (cluster mode enabled) configuration allows you to partition your data across multiple shards and offers better scalability, performance, and availability.

How many Redis nodes do I need?

If you rely on Redis to fail over, you need a minimal of three master nodes and three slave nodes (a minimal of 3 servers, each running a master and a slave).

Is Redis multi master?

In the upcoming version of Redis Enterprise 5.0, we are delivering a new flexible, multi master replication technology built for WAN.

Why do we need Redis cluster?

Redis Cluster provides a way to run a Redis installation where data is automatically sharded across multiple Redis nodes. Redis Cluster also provides some degree of availability during partitions, that is in practical terms the ability to continue the operations when some nodes fail or are not able to communicate.


1 Answers

I think what you have pointed out is right. It is suggested to have three master node and one slave to each of them.

http://redis.io/topics/cluster-tutorial: Note that the minimal cluster that works as expected requires to contain at least three master nodes. For your first tests it is strongly suggested to start a six nodes cluster with three masters and three slaves.


Still you might be able to create cluster with less than three master node but that will affect the failover process you already pointed.

like image 85
shakhawat Avatar answered Oct 03 '22 22:10

shakhawat