大网数据广告活动
服务器运维问答

Redis cluster: 3 master nodes minimum?

· 52CE 我爱测

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 m…

问题原文

原帖链接 · Mat · CC BY-SA 3.0

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!

已采纳解答

原帖链接 · Itamar Haber · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-11-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。