Tutorials / Tech blog / Geek Zone

Latest Posts

Tuesday, May 29, 2018

CAP Theorem

CAP theorem was the term coined by Eric Brewer at the 2000 Symposium on Principles of Distributed Computing (PODC), states that it is impossible for a distributed data store to simultaneously provide more than two out of consistency, availability, and partition tolerance. It helps make system designers aware of the practical trade-offs while designing distributed data systems.

Consistency - Assurance that every node in a distributed cluster returns the most recent, successful write.

Availability - Every non-failing node returns a response for all read and write requests in a reasonable amount of time - without guarantee that it contains the most recent write.

Partition Tolerant - The system continues to function and upholds its consistency guarantees in spite of network partitions. Distributed systems must also gracefully recover once the partition heals.



CAP Theorem categorizes system into three categories

CP (Consistent and Partition Tolerant) - A system that is consistent and partition tolerant but never available. In other words, Availability - sacrificed only in the case of a network partition.

CA (Consistent and Available) - CA systems are consistent and available systems in the absence of any network partition. Single node databases can be classified in this category.

AP (Available and Partition Tolerant) - These are systems that are available and partition tolerant but cannot guarantee consistency. e.g Cassandra database provides eventual consistency feature.

No comments:

Post a Comment