← Week 1: Consistency Models

Day 4: PACELC Tradeoffs

Phase 1 · May 23, 2026

← Week 1: Consistency Models

Agenda (2–3 hours)

  • Read (45 min): Abadi "Consistency Tradeoffs in Modern Distributed Database System Design" (IEEE Computer 2012)
  • Study (45 min): Apply PACELC to 5 systems you're familiar with
  • Practice (45 min): Sketch how tunable consistency (quorum reads/writes) moves a system along the PACELC axes
  • Challenge (30 min): Design a key-value store configuration for a use case where latency matters more than consistency during normal operation but you need CP during partitions
← Week 1: Consistency Models

Why CAP Is Incomplete

CAP only asks: what happens during a partition?

But most of the time there is no partition. During normal operation, the tradeoff is different:

  • Synchronous replication → consistent, but higher latency
  • Asynchronous replication → low latency, but stale reads possible

PACELC captures both cases.

← Week 1: Consistency Models

PACELC Model (Abadi 2012)

If Partition (P):

  • trade off Availability vs Consistency

Else (E) — during normal operation:

  • trade off Latency vs Consistency
← Week 1: Consistency Models

Systems on the PACELC Map

System Partition Else Tunable?
Dynamo / Cassandra PA EL Yes — quorum r+w
DynamoDB default PA EL Yes — strong reads
CockroachDB PC EC No — always serializable
MongoDB (majority write) PC EC Partial
Riak PA EL Yes
HDFS PC EC No

Most systems default to PA/EL and let operators tune toward PC/EC.

← Week 1: Consistency Models

Quorum Arithmetic

For a cluster of N replicas, choose W writes and R reads such that:

W + R > N   →  strong consistency (quorum overlap guaranteed)
W + R ≤ N   →  eventual consistency (no guaranteed overlap)

Example with N=3:

  • W=2, R=2: strong (2+2=4 > 3) — tolerates 1 failure
  • W=1, R=1: eventual — lowest latency, highest availability
  • W=3, R=1: strong reads, slow writes — good for read-heavy workloads

Latency is dominated by the slowest response in the quorum.

← Week 1: Consistency Models

Key Takeaways

  • CAP is about partitions; PACELC adds the normal-operation axis
  • Latency vs consistency is the day-to-day tradeoff for most systems
  • Quorum reads/writes let you dial the tradeoff continuously
  • For Leo Secure Comms: coordination metadata (e.g., certificate revocation) needs PC/EC; bulk message delivery can tolerate PA/EL

Tomorrow: logical clocks — since wall clocks can't be trusted across nodes, how do we order events?