Ram
All topicsTopic 20 / 24
Intermediate 1 minute

CAP Theorem

CAP theorem says that during a network partition, a distributed system must choose between consistency and availability for the affected operation. A partition means nodes cannot reliably communicate; it is not an optional product setting. Systems make different choices by feature: a checkout may reject uncertain writes, while a feed may serve a slightly stale response and stay available.

Key idea

CAP trade-offs become unavoidable when communication between nodes breaks.

See it in one picture

Follow the arrows

Real-world example

If two regions lose their connection, a payment system may pause writes to avoid double spending. A news feed may keep serving cached posts in both regions and reconcile later.

Quick check

Can you spot it?

0/2 answered
Question 1

1. When does CAP force a choice?

Question 2

2. What can an available system do during uncertainty?