简体   繁体   中英

Cassandra tunable consistency exercise

I need some help solving an exercise for school. It's about tunable consistency in Cassandra.

Given a cluster of 15 nodes, complete the following table. In case of multiple posibilities give all of them. CL values are: ANY, ONE, QUORUM, ALL

空白单元的RF,CL,一致性和可用性表

Thank you very much for your help!

ps I'm sure that we need the following rule to solve this: nodes read + nodes written > replication factor to be consistent

This document here should outline the consistency levels and how they function:

https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html

I've copied some of the content here for clarity if the link becomes broken in the future

Write Consistency Levels

ALL

A write must be written to the commit log and memtable on all replica nodes in the cluster for that partition.

EACH_QUORUM Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in each datacenter.

QUORUM

A write must be written to the commit log and memtable on a quorum of replica nodes across all datacenters.

LOCAL_QUORUM

Strong consistency. A write must be written to the commit log and memtable on a quorum of replica nodes in the same datacenter as the coordinator. Avoids latency of inter-datacenter communication.

ONE

A write must be written to the commit log and memtable of at least one replica node.

TWO A write must be written to the commit log and memtable of at least two replica nodes.

THREE A write must be written to the commit log and memtable of at least three replica nodes.

LOCAL_ONE

A write must be sent to, and successfully acknowledged by, at least one replica node in the local datacenter.

ANY

A write must be written to at least one node. If all replica nodes for the given partition key are down, the write can still succeed after a hinted handoff has been written. If all replica nodes are down at write time, an ANY write is not readable until the replica nodes for that partition have recovered.

Read consistency levels

ALL

Returns the record after all replicas have responded. The read operation will fail if a replica does not respond. EACH_QUORUM

Not supported for reads.

QUORUM

Returns the record after a quorum of replicas from all datacenters has responded.

LOCAL_QUORUM

Returns the record after a quorum of replicas in the current datacenter as the coordinator has reported. Avoids latency of inter-datacenter communication.

ONE

Returns a response from the closest replica, as determined by the snitch. By default, a read repair runs in the background to make the other replicas consistent.

TWO

Returns the most recent data from two of the closest replicas.

THREE

Returns the most recent data from three of the closest replicas.

LOCAL_ONE

Returns a response from the closest replica in the local datacenter.

SERIAL

Allows reading the current (and possibly uncommitted) state of data without proposing a new addition or update. If a SERIAL read finds an uncommitted transaction in progress, it will commit the transaction as part of the read. Similar to QUORUM.

LOCAL_SERIAL

Same as SERIAL, but confined to the datacenter.

I think this should be the correct answer. Please correct me if I'm wrong. Ignore the dutch sentences in the table, I don't think it will pose any problems for english readers.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM