Consistency Level of Cassandra Lightweight transactions

前端 未结 2 1968
无人共我
无人共我 2021-02-08 02:16

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

相关标签:
2条回答
  • 2021-02-08 02:35

    Actually a Quorum will be slightly more than one half of the Replication factor of your cluster. In practice, Replication factors are usually kept low (3 or 5), so as to avoid wasting space.

    0 讨论(0)
  • 2021-02-08 02:46

    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".

    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:

    LIGHTWEIGHT TRANSACTIONS
    LINEARIZABLE CONSISTENCY

    HTH,Carlo

    0 讨论(0)
提交回复
热议问题