Distributed Systems

CAP theorem

When the network splits, a replicated system must either refuse some requests or risk returning stale data.

Main article: CAP theorem simulator


In plain terms

Eric Brewer stated it as a conjecture in 2000; Seth Gilbert and Nancy Lynch proved it in 2002. It is often misread as 'pick two of three': the choice only has to be made while a partition lasts.

Origin

Eric Brewer proposed it as a conjecture at PODC 2000. Seth Gilbert and Nancy Lynch proved a formalised version in 2002. Brewer revisited it in IEEE Computer (2012), arguing the popular framing ("pick two of three") was misleading: in practice the choice is only made during a partition.

Where it shows up in production
  • etcd & ZooKeeper CP: the side of a partition without a majority stops accepting writes rather than risk a split brain.
  • Cassandra Leans AP: replicas accept writes on both sides and reconcile later. The consistency level can be set per query.
  • DynamoDB Reads are eventually consistent by default; a strongly consistent read can be requested for each read.
On Semicolony
Sources & further reading
Found this useful?

Published