Glossary

CAP Theorem

In a network partition, a distributed store can keep either Consistency or Availability — not both.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

In a network partition, a distributed store can keep either Consistency or Availability — not both.

How it works

When nodes can't talk (P, which you can't avoid), you choose: refuse writes to stay consistent (CP, e.g. etcd, Spanner) or keep serving and reconcile later (AP, e.g. Cassandra, Dynamo). When the network is healthy you get both — CAP only forces the choice during a partition. PACELC extends it to the no-partition case (latency vs consistency).

Common questions

What is CAP Theorem?

In a network partition, a distributed store can keep either Consistency or Availability — not both.

How does CAP Theorem work?

When nodes can't talk (P, which you can't avoid), you choose: refuse writes to stay consistent (CP, e.g. etcd, Spanner) or keep serving and reconcile later (AP, e.g. Cassandra, Dynamo). When the network is healthy you get both — CAP only forces the choice during a partition.…

What is CAP Theorem used for in system design?

When nodes can't talk (P, which you can't avoid), you choose: refuse writes to stay consistent (CP, e.g. etcd, Spanner) or keep serving and reconcile later (AP, e.g. Cassandra, Dynamo). When the network is healthy you get both — CAP only forces the choice during a partition.…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →