Home/Labs/PACELC Latency Bench
All 280 Labs
INTERACTIVE LAB📐

PACELC Latency-Consistency Tradeoff Lab (Interactive)

See the always-on half of the tradeoff: consistency vs latency when no partition exists. Configure a replication archetype, then sweep region RTT and fsync cost to compute write latency, staleness, and whether you fit the SLO budget.

PACELC Latency-vs-Consistency Dial

CAP only speaks during the 0.1% of time a partition rages. PACELC prices the other 99.9%: Else choose Latency or Consistency.

Cross-region RTT70ms
Disk fsync cost2ms
Async replication lag250ms
p99 write latency SLO budget20ms
Steady-state write latency (E-branch)Available / Low-latency
2.5msp99 ≈ 3ms
Within 20ms SLO(budget marker at 9% of bar)
Read staleness window
250 ms
Async replicas serve stale reads by design (the L in EL).
Minority partition writes
n/a
Toggle the partition to price the P-branch.
PA/EL — Writes commit locally to the CommitLog in ~1ms and replicate asynchronously in the background. Right now reads observe a single logical copy.

How It Works Under the Hood

PACELC extends CAP with the observation that Even without partitions, systems trade latency against Consistency: a synchronous cross-region quorum commit is perfectly consistent but pays round-trip light-speed on every write, while async replication answers fast from a local replica that may be seconds behind. This lab models the four archetypes — PC/EC, PA/EL, PC/EL, PA/EC — and computes p99 write latency from fsync plus network terms you control. The gap between the latency bar and the SLO budget is the visual proof that Dynamo-style and Spanner-style stores made opposite always-on choices.

Core Architectural Principles

  • Write latency composed from fsync cost plus optional cross-region RTT when quorum-synchronous.
  • Staleness metric grows with replication lag the moment you choose EL over EC.
  • SLO budget bar shows which PACELC archetype can actually meet your p99 target.
Interview Round Script

Say CAP only governs partition behavior and PACELC governs the other 99.9% of the time — examiners listen for this. When choosing EL, quantify it: “writes ack in under 5 ms locally, replication SLO 200 ms, staleness p99 under 1 s,” which turns a theorem into a capacity conversation.

Key Trade-Offs

Every millisecond you save by not waiting for remote replicas is bought directly from freshness.

Related Curriculum Chapter

The PACELC Theorem

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs