Cassandra CAP Theorem
Cassandra's CAP Theorem
Cassandra's CAP theorem states that all consistency, availability, partition-tolerance cannot be given in one system. All the databases can have partition-tolerance but they must choose between consistency and availability. Cassandra is a AP database. It gives high availability and partition-tolerance and it also gives tunable consistency. We can tune our required consistency in Cassandra. But in Cassandra high consistency gives low availability. So we must choose our database based on our requirement.
CAP theorem is also called Brewer’s theorem. It is named after after its author, Eric Brewer.
Consistency :
All the users will read the same data for the same query, even when concurrent updates are done.
Availability :
All the users will always be able to read and write data.
Partition Tolerance : The database can be split into multiple machines. It can continue functioning in
the face of network segmentation breaks.
Cassandra is a AP system. It cares mostly about availability than consistency.
AP: It is used mostly to support Availability and Partition Tolerance, our system may return
inaccurate data, but the system will always be available, even in the face of network
partitioning. But soon it's data will become accurate by using some repair methods. So, the applications which do not care much about consistency and needs high availability can use Cassandra.
Comments
Post a Comment