NEW
Principle stating a distributed system can simultaneously provide at most two of consistency, availability, and partition tolerance.
DESCRIPTION
CAP Theorem articulates trade-offs under network partitions: systems choose consistency (C) or availability (A) while tolerating partitions (P). CP systems prioritize correctness; AP systems favor availability with eventual consistency. It guides database and service design, especially for geo-distribution and high availability. PACELC extends CAP by considering latency vs. consistency even without partitions. Real architectures balance consistency levels per operation. Understanding failure modes and client expectations is critical to applying CAP responsibly.
ALTERNATIVE DEFINITIONS
Communications of the ACM
Consistency, availability, and partition tolerance are the three properties that cannot be simultaneously achieved in a distributed system.
States the impossibility result and frames architectural trade-offs.
Cloudflare
The CAP theorem states that a distributed database can only provide two of the following three guarantees: consistency, availability, and partition tolerance.
Explicitly applies CAP to distributed databases with guarantees.
Confluent
CAP theorem formally states that a distributed system cannot simultaneously guarantee consistency, availability, and partition tolerance.
Relates CAP to modern streaming systems and practical design.
RELATED TERMS
Consistency Availability Partition Tolerance Eventual Consistency Distributed Systems Replication Network Partition NoSQL Trade-off
COMPETING TERMS
PACELC Theorem
KNOWLEDGE AREAS
Data Architecture Data Storage & Operations Real-time & Streaming Data Cloud Software Engineering
TARGET AUDIENCE
Data Architect Software Developer Cloud Architect Enterprise Architect Data Engineer
EXTERNAL SOURCES
- Wikipedia - CAP theorem
- Communications of the ACM - Brewer’s retrospective on CAP
- Cloudflare - Plain-language CAP explanation
- Confluent - CAP in streaming system design
- AWS Builders Library - Distributed systems trade-offs
TOP QUESTIONS
Why does CAP Theorem matter?
It clarifies unavoidable trade-offs under network partitions, shaping database and service choices for consistency and availability.
Category: Relevancy
Is CAP Theorem only about databases?
No, it applies to any distributed system, including caches, queues, and microservices facing partitions.
Category: Misunderstanding
What is the biggest risk when misapplying CAP Theorem?
Assuming CAP dictates all design decisions can oversimplify; latency, durability, and user expectations also matter.
Category: Risk
How does PACELC relate to CAP Theorem?
PACELC extends CAP by considering latency vs. consistency trade-offs even when no partition occurs.
Category: Opinion
Can a system be both consistent and available?
Yes, in the absence of partitions; under partitions, you must trade one for the other.
Category: Requirements
What is eventual consistency in CAP context?
It relaxes strong consistency, allowing replicas to converge over time while retaining high availability.
Category: Example
How should teams choose CP vs AP?
Assess correctness requirements, user tolerance for stale data, and partition likelihood; choose per operation when possible.
Category: Opinion
Does CAP Theorem assume synchronous networks?
No, it explicitly considers partitions and failure modes, acknowledging unreliable networks.
Category: Requirements
Where to start learning CAP Theorem?
Read Brewer’s CACM article, then explore PACELC and vendor guidance on distributed design trade-offs.
Category: Overview