 ##  [CAP Theorem](/cap-theorem-0) 

 Definition

A theorem in distributed systems stating that, in the presence of network partitions, a distributed data store can provide at most two of these three guarantees simultaneously: consistency (all nodes see the same data at the same time), availability (every request receives a response), and partition tolerance (the system continues to operate despite message loss or network splits).

 

 

 

 

 

 





## Principle

Principle

Under asynchronous networks where partitions can occur, designers must trade off between consistency and availability when a partition exists; one cannot simultaneously guarantee all three properties in all failure scenarios.

 

 

 

 

 





## Demonstration

Demonstration

If a network split separates a cluster into two halves, a replicated key-value store that remains available on both sides may return divergent values (favoring availability and partition tolerance), whereas a store that enforces strict consistency may reject requests on one side until the partition heals (favoring consistency and partition tolerance).

 

 

 

 

## Misapplication

Misapplication

Interpreting CAP as strictly forbidding any system from providing both consistency and availability ever; or conflating CAP categories with latency, durability, or nuanced consistency models like eventual or causal consistency.

 

 

 

 

 





## Consequence

Consequence

Guides architecture choices for distributed systems: under partition risk, choose CP (consistency+partition tolerance) to prioritize correctness, or AP (availability+partition tolerance) to prioritize serving requests, while CA is only possible when partitions cannot occur or are ignored.

 

 

 

 

## Reversal

Reversal

In a perfectly reliable network with no partitions, a system can be both consistent and available (CA), but real networks are fallible, so partition tolerance must be considered in practical designs.

 

 

 

 

 





## Boundary

Boundary

Formal statement applies to the model allowing network partitions and to binary notions of consistency and availability; it does not quantify degrees of consistency, nor prescribe specific mechanisms—practical systems use relaxed consistency, partial availability, retries, and other techniques outside the binary CAP classification.

 

 

 

 

 





## Semantic Tension

Semantic Tension

Tension arises between the coarse CAP trichotomy and richer modern consistency taxonomies (e.g., eventual, causal, strong consistency) and between theoretical worst-case partition events and typical operational behavior; designers must map CAP choices to application-level requirements and observable trade-offs.

 

 

 

 

 





## Synthesis

Synthesis

The CAP theorem formalizes a fundamental trade-off in distributed system design: when partitions are possible, you cannot guarantee consistency, availability, and partition tolerance all at once, so architects must choose which guarantees to prioritize or adopt intermediate/relaxed models that balance them in practice.