Advanced Distributed Systems #CAP #PACELC #consistency #system-design

CAP & PACELC

5 exercises — master CAP and PACELC trade-off vocabulary: CP vs AP systems, PACELC latency/consistency trade-off, Spanner external consistency, tunable consistency, and applying CAP analysis to payment system design.

0 / 5 completed
CAP & PACELC quick reference
  • CAP theorem — during partition, choose C (consistency: error rather than stale) or A (availability: respond even if stale). P is mandatory.
  • CP examples — etcd, ZooKeeper, RDBMS sync replicas, HBase, CockroachDB.
  • AP examples — Cassandra, DynamoDB (eventual), CouchDB, Riak.
  • PACELC — extends CAP: if Partition → A/C; Else (healthy) → Latency/Consistency trade-off.
  • PA/EL — available under partition, low latency when healthy (Cassandra, DynamoDB eventual).
  • PC/EC — consistent under partition, higher latency when healthy (Spanner, etcd).
  • Tunable consistency — per-operation consistency levels (Cassandra: ONE/QUORUM/ALL; DynamoDB: ConsistentRead).
  • Spanner — CP, external consistency via TrueTime; not a CAP refutation — sacrifices availability under partition.
1 / 5

A system design interviewer asks: "Explain the CAP theorem. Can a distributed system ever provide all three guarantees?"