Redis cluster: 3 master nodes minimum

clusterredis

I'm evaluating the cluster capabilities of Redis 3 (I'm using Redis 2 standalone at the moment), so I am reading the info at http://redis.io/topics/cluster-tutorial.

In this document I read a very important info:

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.

Is it really true? In my mind this is correct if I would use sharding capabilities (data are shared between nodes), but what if I don't need it and I would be happy of having data on only one node?

I basically need one master and two slaves (so the cluster would be live if one node fails), can I have this configuration in a production environment? If yes, what are the contraindications?

Thank you very much for your help!

Best Answer

Is it really true?

Yes, that's why it is in the documentation :)

In my mind this is correct if I would use sharding capabilities (data are shared between nodes), but what if I don't need it and I would be happy of having data on only one node?

Using Redis in cluster mode means sharding. If you're happy with a single instance, simply don't use the cluster. Otherwise, refer to the cluster specification itself to understand more about the underlying assumptions. Specifically, in the case of minimal cluster configuration, you'll want 3 masters to ensure the cluster's availability in case of a partition, or else you won't be able to agree on majority.