Cassandra 轻量级交易的一致性级别 [英] Consistency Level of Cassandra Lightweight transactions

查看:24
本文介绍了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,卡罗

这篇关于Cassandra 轻量级交易的一致性级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆