Skip to main content
CAP Theoremlesson 4 of 4 · 2 min read

PACELC: The Trade You Make Every Day

CAP only speaks during a failure

CAP only describes behaviour during a partition, and partitions are rare, perhaps minutes a year on a decent network. So it says nothing about the other 99.99 percent of the time.

PACELC completes the picture. If there is a Partition, choose Availability or Consistency. Else, choose Latency or Consistency. That else branch runs on every request, all day, which makes it the more useful tool for daily decisions.

The trade you make every other day

The else branch is driven by one thing: replication. Strong consistency needs a write confirmed by other copies before you acknowledge it, and confirmation costs round trips. Copies in the same data centre make that under a millisecond. Copies on another continent make it 100 milliseconds or more, on every write, forever.

Acknowledging after only the local copy commits and writes get fast, but a read arriving at another replica moments later can still see the old value. That is the latency against consistency trade with no partition anywhere in sight.

Systems wear their posture openly once you know to look. DynamoDB is available under partition and serves eventually consistent reads by default, trading consistency for latency and cost. Spanner refuses instead of forking during a partition, and accepts slower cross-region writes to give strict ordering the rest of the time. Cassandra is tunable and leans available. MongoDB with majority writes leans consistent on both branches.

PACELC turns trivia into judgement. Instead of reciting the theorem, say that your system replicates across three regions, so synchronous replication costs about 80 milliseconds per write, and for this workload you will take asynchronous replication with bounded staleness on reads. That sentence shows you know what the trade costs you in milliseconds, not in letters.

the shape of it
Partition?network stateA vs Cserve stale or refuseL vs Cevery requestDynamo: PA/ELSpanner: PC/ECyes (rare)no (always)
step 1 of 2
PACELC adds the everyday branch: even with a healthy network, replication trades latency against consistency.

Worked example

Leo's team runs a user profile service replicated in Virginia, Frankfurt, and Singapore. With synchronous majority writes, every profile update waits for a transatlantic acknowledgment, about 85 ms, and profile edits feel sluggish worldwide even though the network is perfectly healthy. That is the EL/EC choice in action, no partition involved. They switch to asynchronous replication: writes commit locally in 4 ms, replicas catch up within about a second. The one casualty is read-your-own-writes; Chioma in Lagos edits her bio, her next request routes to Frankfurt, and the old bio flashes back. They patch that specific case by pinning each user's reads to their home region for 10 seconds after a write. Everyday latency won, with a targeted fix for the staleness users would actually notice.

CAP Theorem: wrapping up

In the real world

  • 01Amazon's Dynamo paper (2007) chose availability for the shopping cart, accepting concurrent writes during failures and merging conflicting carts afterward rather than ever refusing an add-to-cart.
  • 02Google Spanner sits on the CP side and spends money on the else branch too: TrueTime atomic clocks and GPS receivers bound clock uncertainty so it can offer external consistency across continents.
  • 03etcd, the store behind Kubernetes, uses Raft with majority quorums; during a partition the minority side refuses writes, which is the CP choice made visible in kubectl errors.
  • 04Cassandra exposes per-query consistency levels (ONE, QUORUM, ALL), letting one application make AP choices for feed data and near-CP choices for critical writes in the same cluster.
  • 05DNS is the classic AP system: resolvers serve cached, possibly stale records governed by TTLs, and the whole internet accepts that staleness in exchange for it always answering.

Questions people ask

Can I just choose CA and avoid partitions?

Not in a distributed system. Partitions are network failures, and you cannot schedule the network to never fail. A single-node database is effectively CA because there is no network inside it, which is a fine answer at moderate scale. Once data is replicated across machines, partition behavior must be defined, so the real choice is CP versus AP.

Is the C in CAP the same as the C in ACID?

No. CAP consistency means linearizability: all nodes agree and reads see the latest write, as if one copy existed. ACID consistency means a transaction moves a single database between valid states, respecting constraints like foreign keys. They share a letter and almost nothing else.

Why do people say PACELC matters more than CAP?

Because partitions are rare and replication lag is constant. CAP only governs the few minutes a year the network is actually split. PACELC also covers the healthy case, where you choose between fast local writes with stale replicas or slow synchronous writes with strong consistency. That choice affects every request every day.

Quick review

Consistency (C):
every read returns the most recent write, all nodes see the same data
Availability (A):
every non-failing node returns a response (may be stale)
Partition Tolerance (P):
system continues operating despite dropped messages between nodes
Network partitions are unavoidable in distributed systems → must choose CP or AP
CP systems:
HBase, Zookeeper, etcd, MongoDB (w:majority). Return error if can't guarantee consistency
AP systems:
Cassandra, CouchDB, DynamoDB (default), DNS. Return stale data rather than error
PACELC extension:
even without partition (E), systems trade Latency (L) vs Consistency (C)
Misconception:
CAP doesn't mean ignoring two; partition is rare. PACELC is the everyday trade-off
the trade-off

Strong consistency requires quorum writes → higher latency. Eventual consistency → stale reads possible.

in the room

CP: banking, inventory, leader election. AP: social feeds, shopping carts, DNS, caches.