CAP Theorem
A theorem stating that distributed data stores can only guarantee two of three properties: Consistency, Availability, and Partition tolerance.
Also known as: Brewer's Theorem, CAP Tradeoff
Category: Software Development
Tags: distributed-systems, databases, architecture, software-engineering, systems-design
Explanation
The CAP Theorem, formulated by Eric Brewer, states that a distributed data store cannot simultaneously provide more than two of three guarantees: (1) Consistency - every read receives the most recent write, (2) Availability - every request receives a response (though not guaranteed to be the latest), (3) Partition tolerance - the system continues operating despite network failures between nodes. Since network partitions are inevitable in distributed systems, the practical choice is between CP (consistency + partition tolerance) and AP (availability + partition tolerance). Examples: Traditional databases like PostgreSQL prioritize CP; systems like Cassandra and DynamoDB favor AP with eventual consistency. Understanding CAP helps architects make informed trade-offs when designing distributed systems. Related concepts include PACELC (extending CAP to consider latency) and the BASE model (Basically Available, Soft state, Eventual consistency).
Related Concepts
← Back to all concepts