Cassandra丢失节点 [英] Cassandra loss of a node
问题描述
我试图弄清楚如何为两个节点群集设置参数,以便获得精确的副本,如果其中一个节点已关闭...
使用此工具进行检查: http://www.ecyrd.com/cassandracalculator/
I'm trying to figure out, how to parameter my 2 nodes cluster, in order to have an exact replica, if one of them is down... using this tools to check it out : http://www.ecyrd.com/cassandracalculator/
对于以下参数:
Cluster size: 2 / Replication Factor: 2 / Write Level: All / Read Level: One
它给了我结果:
- 您的读取结果一致
- 您可以在丢失无节点的情况下幸免。
- 您实际上每次都是从 1个节点进行读取。
- 您实际上每次都在写入 2个节点。
- 每个节点持有 100%您的数据。
- Your reads are consistent
- You can survive the loss of no nodes.
- You are really reading from 1 node every time.
- You are really writing to 2 nodes every time.
- Each node holds 100% of your data.
除了一个您可以在没有节点丢失的情况下生存之外,我同意所有这些结果。
我不明白为什么群集无法从一个节点丢失中幸存下来,如果一个节点死亡, Write:ALL将写入仅剩下的一个节点,不是吗?
然后,当我恢复第二个节点时,它应该与第一个节点同步,并再次接受写入,不是吗?
I agree with all those result except one, "You can survive the loss of no nodes". I don't get why the cluster can't survive from one node loss, if one dies, the "Write: ALL" will write to the only one node left, doesn't it ? Then when I bring back up the second node, it should synchronize with the 1st, and accept writes again, doesn't it ?
如果错误,有人可以向我解释原因吗?
If I'm wrong, can someone explain to me why ?
编辑:
更多配置会给我相同的结果,除了持有百分比:
More Configuration will give me the same results except for the holding %:
Cluster size: 3 / Replication Factor: 2 / Write Level: All / Read Level: One
Cluster size: 3 / Replication Factor: 2 / Write Level: Quorum / Read Level: One
即使我尝试与读取而不是写入保持一致:
Even if I try to be consistent with Reads, and not Writes :
Cluster size: 2 / Replication Factor: 2 / Write Level: One / Read Level: Quorum
每次它告诉我我不能承受损失
Every time it tells me that I can't suffer the loss on any node.
推荐答案
那是因为复制因素
当复制因子超过节点数时,写入被拒绝,bu只要满足所需的一致性
水平,就可以进行t读。
来源: http://www.datastax.com/docs/1.0/cluster_architecture/replication
这篇关于Cassandra丢失节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!