Datastax course says that Cassandra is availability/partition tolerance. However, according to this document it can be tuned to be strong consistency (i.e. CP) by setting W + R > RF, where W is the write consistency level, R is the read consistency level, and RF is the replication factor.
1
votes
1 Answers
2
votes
Tuneable to strong consistency for single partition
- It can be tuned to strong consistency for documents in
single partition
. So if you statements belong to different partitions (note same partition key and different table is still different partition), you cannot tune it for strong consistency. So Cassandra has its upper bound to it's strong consistency unlike in RDBMS where you can update multiple records in different tables or different rows in same table atomically.
Tuning for higher consistency makes you lose some of the
Availabilityand
Partition Tolerance`
- When you use
hinted handoff
, it is almost on theAP
axis as it is always available to write even with network partitions. But as soon you start tuning for higher consistency, clients have to wait for writes or reads until it is written to enough replicas /read from enough replicas to satisfy the requested consistency. So you are losing bit ofavailability
andpartition tolerance
Summary
You can configure it for maximum availability
and partition tolerance
but you cannot configure for much stronger consistency
. So Cassandra lies in AP axis in CAP