Grokking the System Design Interview, Volume II
Vote

0% completed

​

Cassandra Consistency Levels

Cassandra replicates every row across several nodes. So a read or a write almost never touches just one machine. This lesson looks at how Cassandra decides when enough replicas have answered. It calls that a consistency level.

What are Cassandra's consistency levels?

A consistency level is the minimum number of nodes that must respond to a read or a write. Once that many respond, Cassandra calls the operation successful. We set this level per query, and we can pick a different level for reads than for writes

.....

.....

.....

Like the course? Get enrolled and start learning!
T

Techies

· 3 years ago

Please explain

To achieve strong consistency in Cassandra: Read Replica Count +Write Replica Count> Replication Factor gives us strong consistency. In this equation. All client reads will see the most recent write in this scenario, and we will have strong consistency.

Q1: How is Read/Write Replica Count different than Replication Factor count?

Q2: Example: A cluster has a total of 3 nodes, Read replica 1, Write Replica 1, Replication factor 1. But still its possible that one node may not have the latest data, so how will it be strongly consistent?

Show 1 reply
A

Amey Naik

· 5 years ago

"Cassandra selects a single replica to query for the full object and asks for the digest of the data from two additional nodes in order to ensure that the latest version of the data is returned. The Snitch helps to identify the fastest replica, and Cassandra asks this replica for the full object."

Show 2 replies

Reading Progress

0%


Vote for new content