CAP Theorem Explained: Why Distributed Systems Must Choose Between Consistency and Availability
The CAP theorem states that a distributed system can guarantee only two of three properties — Consistency, Availability, and Partition Tolerance — simultaneously. Since network partitions are unavoidable in real-world distributed systems, engineers must choose between CP (consistency over availability) or AP (availability over consistency). CP systems, such as HBase, Zookeeper, and MongoDB, refuse to return potentially stale data during a partition, making them suitable for banking, inventory, and leader election use cases. AP systems, such as Cassandra, DynamoDB, and CouchDB, continue serving requests even with stale data, which is acceptable for social media feeds, DNS, and product catalogs. The PACELC model extends CAP by also accounting for the latency-versus-consistency trade-off that exists even when no partition is occurring.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in