Database Reference
In-Depth Information
Read consistency
The read consistency is analogues to write consistency, it denotes how many replicas
should respond or confirm their alignment to the data being returned to read operation be-
fore the results are returned to the client querying the Cassandra data store. This means if
on an N node cluster with a replication factor of x , a read query is issued with a read con-
sistency of y (y is less than x), then Cassandra would check the y replicas and then return
the results. The results are validated on the basis that the most recent data is used to satisfy
the request, and this is verified by the timestamp associated with each column.
The following Cassandra Query Language ( CQL ), fetch the data from the column family
with quorum consistency as follows:
SELECT * FROM mytable USING CONSISTENCY QUORUM WHERE
name='shilpi';
The functions of the CQL are as follows:
Consistency level
Implication
ONE
A read request is serviced by the response from the closest replica
TWO
A read request is serviced by the most recent response from one of the two closest replicas
THREE
This level returns the most recent data from three of the closest replicas
QUORUM
A read request is serviced by the most recent responses from the quorum of replicas
ALL
A read request is serviced by the most recent response from all the replicas
Search WWH ::




Custom Search