Database Reference
In-Depth Information
ALL: With the consistency level ALL write requests must be written to
the commit log and memory table on all replica nodes in the cluster for
that row key to ensure the highest consistency level.
SERIAL: Linearizable consistency is being introduced in Cassandra 2.0
as a lightweight transaction support. With the consistency level SERIAL
write requests must be written to the commit log and memory table on
quorum replica nodes conditionally. Here conditionally means either
guaranteed write on all nodes or none.
TWO: Similar to ONE except with the consistency level TWO write re-
quests must be written to the commit log and memory table on minim-
um two replica nodes.
THREE: Similar to TWO except with the consistency level TWO write
requests must be written to the commit log and memory table on a min-
imum of three replica nodes.
Read Consistency
No data is of much use if it is not consistent. Large or small data applications would
prefer not to have dirty reads or inconsistent data. A dirty read is a scenario where a
transaction may end up in reading uncommitted data from another thread. Although
dirty reads are more RDBMS specific, with Cassandra there is a possibility for incon-
sistent data if the responsible node is down and the latest data is not replicated on each
replica node. In such cases, the application may prefer to have strong consistency at the
read level. With Cassandra's tunable consistency, it is possible to have configurable
consistency per read request. Possible options are
ONE: With the read consistency level ONE, data is returned from the
nearest replica node to coordinator node. Cassandra relies on snitch con-
figuration to determine the nearest possible replica node. Since a re-
sponse is required to be returned from the closest replica node, ONE is
the lowest consistency level.
QUORUM: With the read consistency level QUORUM, the last up-
dated data (based on timestamp) is returned among data responses re-
ceived by a quorum of replica nodes.
LOCAL_QUORUM: With the read consistency level
LOCAL_QUORUM, the last updated data (based on timestamp) is re-
Search WWH ::




Custom Search