core practice · coding problem
CAP under partition
Network split isolates two DB nodes. Choose CP or AP for payment ledger vs social likes feed.
The mechanism
During a network partition you must choose: stay Consistent (reject requests that cannot be confirmed) or stay Available (serve possibly-stale data). CAP only bites during a partition; PACELC adds the everyday tradeoff — Else, Latency vs Consistency.
Expected evidence
Ledger: CP (reject writes); likes: AP (allow divergence + merge).
Try this drill in the practice workspace →
Hints when you need them
- Partition forces C vs A tradeoff.
- PACELC extends for normal case.
Watch for these mistakes
- Thinking you "pick 2 of 3" at all times — the choice only applies during a partition
- Calling a system "CA" — partitions are not optional in a distributed system
- Ignoring the latency-vs-consistency tradeoff that exists even with no partition