Learning path

Full curriculum

Full curriculum

Arrows go from each prerequisite to the units that depend on it. Hover or focus a unit to highlight its path.

Unit content

The CAP theorem and network partitions

A network partition separates parts of a distributed system so some nodes cannot communicate even though those nodes may still be running.

The CAP theorem concerns what a replicated service can guarantee while such a partition persists.

If clients can reach both sides, the system cannot simultaneously guarantee

  • linearizable consistency: all completed operations fit one real-time-respecting single-copy order; and
  • availability: every request to a nonfailed reachable node eventually receives a non-error response.

A system that preserves linearizability may have to reject or delay operations on a side that cannot coordinate. A system that remains available on both sides may accept operations whose results temporarily diverge.

CAP is not a general instruction to “pick two of three” during normal operation. The trade-off becomes unavoidable specifically when the network is partitioned.