Tuning consistency

Cassandra's tunable consistency allows us to specify for each query how many replicas must be involved for the request to be considered a success. Consistency is not directly specified as part of the CQL query; instead, it is provided as an additional parameter given to the driver when performing a query. Different language drivers handle this differently, but any CQL driver should provide an interface for specifying the consistency for a given query.

Cassandra defines eleven different consistency levels, but many of them are for fairly specialized scenarios. We will explore the three most important and useful consistency levels: ONE, ALL, and QUORUM.

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.