CAP Theorem
In a distributed system, consistency, availability, and partition tolerance cannot all be guaranteed at once. CAP is a mathematically provable trilemma, not merely a difficult engineering compromise.
Build a distributed system and ask for three seemingly basic properties—consistent answers, an available service, and tolerance of partitions. The surprise is that no design can guarantee all three.
E1Three guarantees, one impossible combination
CAP turns system design into a question of guarantees under constraint. Consistency, availability, and partition tolerance are individually desirable, but their combination is impossible; the specification itself must give way somewhere. That makes CAP a precise case of constraints-vs-guarantees: listing desirable outcomes does not make them jointly achievable. It also exposes why removing a single-point-of-failure is not enough—distribution can improve resilience while introducing a different, unavoidable trade-off.
E1A theorem is not a universal three-item rule
CAP applies specifically to distributed systems and these three guarantees. It should not be stretched into proof that every choice among three goals is impossible, nor confused with a multi-sided-coordination-problem, where the obstacle is actors waiting on one another rather than a mathematically incompatible set of guarantees.
Make the sacrificed guarantee explicit
Before approving a distributed-system design, write down the three CAP guarantees and require the design to state which one it cannot promise simultaneously with the other two. If the answer is “none,” the requirements still contain an impossibility.
E1Episodes that teach this
-
You Can't Have Everything You Want | Impossible Trilemmas
· explained at 2:26
1,763 views
"In a distributed system consistency, availability and partition tolerance all three you cannot get."