本文介绍了Cassandra轻量级事务的一致性级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我阅读了关于Cassandra 2的轻量级事务。这种写入的一致性级别是否总是在QUORUM?这是否意味着即使我有一个具有100个节点的多数据中心设置,然后涉及整个集群的仲裁(跨所有数据中心的行的副本的大多数)?这不会真的很慢,不会影响可用性吗? I read about Cassandra 2's lightweight transactions. Is the consistency level of such a write always at QUORUM? Would this mean that even if I have a multi data center setup with 100s of nodes, then quorum of the entire cluster (majority of the row's replicas across all data centers) is involved? Won't this be really slow and wont it affect availability? 我们可以做LOCAL_QUORUM或EACH_QUORUM一致性吗? Can we do LOCAL_QUORUM or EACH_QUORUM consistency? This would be preferred if writers for data replicated across multiple data centers would always originate from a specific data center only.推荐答案建议使用的数据中心的数据复制的写入者总是来自特定的数据中心。轻量级事务的一致性级别为SERIAL。在幕后,SERIAL甚至比QUORUM差,因为它是一个多阶段QUORUM。正如你所说,当你有多个DC - Datastax估计有效地退化到正常的三分之一时,情况会很难处理。The suggested Consistency Level for lightweight transactions is SERIAL. Behind the scenes however SERIAL is even worse than QUORUM, because it's a multi-phase QUORUM. As you said the situation can get hard to handle when you have multiple DC -- Datastax estimate "effectively a degradation to one-third of normal".有一个LOCAL_SERIAL适合您所有DC从特定DC接收数据的情况。There is a LOCAL_SERIAL that could be perfect for your situation where all DCs receive data from a specific DC.在这里您可以找到更多信息:Here you can find more info: 轻量交易 线性一致性 HTH,Carlo HTH,Carlo 这篇关于Cassandra轻量级事务的一致性级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-21 02:19