</>CodexBash
All articles
Databases

The CAP theorem

The CAP theorem explained without the myths: consistency, availability and partition tolerance defined precisely, why partitions force a choice, CP and AP systems with real database examples, PACELC and the latency trade-off, tunable consistency, and how to use CAP in design discussions.

CodexBash, , 5 min read

The CAP theorem is one of the most quoted ideas in distributed systems and one of the most misunderstood. It is often summarised as "consistency, availability, partition tolerance: pick two", which sounds like a menu where you can skip partition tolerance. You cannot. This article defines the three properties precisely, explains what the theorem actually says, shows how real databases make the choice, and introduces PACELC, which captures the trade-off that matters most of the time.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.