Skip to content

CAP Theorem — Consistency, Availability, Partition Tolerance

Understand the CAP theorem beyond the textbook definition, see how real systems make trade-offs, and learn to choose the right consistency model.

15 min readarchitecture, system-design, distributed-systems, cap-theorem

The CAP theorem is the most cited and most misunderstood concept in distributed systems. It is often reduced to "pick two out of three," which is both misleading and unhelpful. The real insight is subtler and more practical: when a network partition occurs, you must choose between consistency and availability. Understanding this trade-off — and the spectrum between the two extremes — is essential for designing systems that behave correctly under real-world conditions.

The Three Properties

Consistency (C)

Every read receives the most recent write or an error. All nodes in the system see the same data at the same time.

Consistent system:
  Client writes X=5 to Node A
  Client reads X from Node B → gets 5 (always)
 
  If Node B hasn't received the update yet,
  it waits or 

This lesson is part of the Guild Member curriculum. Plans start at $29/mo.