PACELC: Latency vs Consistency
System Design

PACELC: Latency vs Consistency

Subtitle: Latency and consistency are the everyday trade

Left column - Optimize for LATENCY:

Ack after one node accepts the write Round trip stays local, about 2 ms A reader may see stale data briefly Cassandra, Riak, DynamoDB, Couchbase Classified PA / EL under PACELC

Right column - Optimize for CONSISTENCY:

Wait for a quorum to confirm the write Cross-region round trip, about 90 ms Every reader sees the newest value Sync Postgres, etcd, ZooKeeper, Spanner Classified PC / EC under PACELC

Simple difference:

Latency = answer fast, maybe slightly old Consistency = answer correct, pay the wait

Use it when - LATENCY: feeds and timelines, product listings, analytics and counters Use it when - CONSISTENCY: account balances, inventory and stock, a user reading their own edit

Sticky note - Common beginner mistake:

Treating PACELC as one setting for the whole database. The choice is made per operation, so buy the weakest guarantee that still keeps the promise you made to the user.