---
topic: system-design
author: Crashtech Editorial
date: Aug 4, 2026 · read: 7 min
---

The CAP Theorem Is Not a Menu

Network partitions force a hard choice: refuse writes (CP) or accept and diverge (AP). Why the two-of-three myth is wrong, and what PACELC really tells us.

In 2000, Eric Brewer stated a conjecture: distributed systems could provide at most two of three guarantees — Consistency, Availability, or Partition tolerance. For two decades, teams have recited it as gospel. “We picked two,” they say. But this framing is wrong. Partition tolerance is not negotiable on real networks. What CAP actually says is: when a partition occurs, refuse the write (consistency wins) or accept it and handle divergence (availability wins). There is no third door.

Network partition forces two outcomes: refuse the write for consistency or accept and diverge for availability

A network partition splits the cluster. The majority side must refuse writes to stay consistent (CP). The minority side can accept them and diverge (AP). One cluster becomes two until reconciliation.

The Myth of the Three-Legged Stool

The common reading of CAP is that you get to choose: Consistency and Availability (eventual consistency), Consistency and Partition tolerance (classic SQL databases with failover), or Availability and Partition tolerance (NoSQL systems). A diagram shows three circles overlapping, and you pick which two touch.

This is not how distributed systems work. Partitions will occur. Google has documented partitions between datacenters. Amazon EBS has seen network blips. Kubernetes clusters see replica disconnections. A partition is not a scenario you engineer away — it is a fault class that engineering must absorb.

Once a partition occurs, you no longer have a choice of all three. You have exactly two choices:

  1. Refuse the write. Block all write operations that require coordination you cannot reach. The system stays consistent (every read sees the latest write), but becomes unavailable to clients on the minority side of the partition.

  2. Accept the write. Allow writes to proceed locally on any replica that can. The system stays available (clients get responses), but replicas diverge. When the partition heals, you must reconcile the conflict — merge, pick a winner, or apply causality rules.

You cannot have both at the same time. That is the core of CAP.

How CP Systems Handle Partitions

Consistency-preserving systems — etcd, ZooKeeper, Spanner — use quorum writes. To commit a write, the leader must contact a majority of replicas and get their acknowledgment. If a partition splits the cluster:

  • If the leader is on the majority side, writes continue. Replicas on the minority side cannot vote, so they fall behind.
  • If the leader is on the minority side, writes are rejected. Clients see “unavailable” until the partition heals or a new leader is elected on the majority side.

The guarantee is: once a write is acknowledged, every subsequent read will see it. No stale data surprises. The cost is that minority-side clients are locked out.

Example: etcd during a partition. Three replicas, one leader. If a network partition isolates the leader, it cannot reach two of three replicas. A quorum requires two replicas. The leader steps down. New writes are rejected with “not a leader” until a new leader is elected on the majority side. Clients waiting for reads see eventual responses, but writes fail for seconds or longer until failover.

How AP Systems Handle Partitions

Availability-preserving systems — DynamoDB, Cassandra — use local writes. Any replica can accept a write immediately without contacting others. If a partition splits the cluster:

  • Both sides of the partition can serve both reads and writes. Clients get low-latency responses.
  • Replicas diverge. If two clients write different values to v on opposite sides, both are stored as valid.
  • When the partition heals, the system merges the diverged versions (using timestamps, vector clocks, or application-defined merge functions).

The guarantee is: every client gets a response. The tradeoff is that replicas are temporarily inconsistent, and merge conflicts are real.

Example: Cassandra during a partition. Write v=99 on the left side, v=100 on the right side. Both are durable. When the partition heals, Cassandra sees both writes. By default, it picks the latest by timestamp. If the timestamps are identical, both versions are stored and the application must resolve the conflict. Clients may have seen v=99 on the left and v=100 on the right — temporarily inconsistent, but available.

Why This Matters: The Real Workload Tradeoff

The CAP choice is not theoretical. It shapes how you run production systems:

  • CP is the only choice for financial transactions, inventory counts, or any operation where temporary divergence is unacceptable. A bank cannot tell a customer “your balance might have changed since you refreshed.” Writes must be refused if consistency cannot be guaranteed.

  • AP is the only choice for impressions, activity feeds, cache layers, or workloads where temporary inconsistency is survivable. A social media platform can afford for some servers to show slightly stale follower counts during a partition. The low-latency win and uptime guarantee justify the reconciliation cost.

Most real systems are not pure — they use both strategies in the same codebase. A payments platform might use strong consistency for transactions (CP) and eventual consistency for analytics (AP). An e-commerce site might use quorum reads (consistency) on the checkout path and plain local reads (availability) on product pages.

The Broader Picture: PACELC

CAP tells you what happens when a partition occurs. But partitions are rare — most of the time the network is working. So what happens then?

PACELC extends the picture. It says: in the Else case (no partition), you still make a tradeoff between latency and consistency. Every operation can:

  • Read locally and get low latency, but potentially stale data (fast, available, inconsistent).
  • Read from a quorum and get consistent data, but higher latency (slow, available, consistent).

PACELC places real systems on the latency-consistency spectrum when there is no partition. CP systems like etcd and Spanner accept higher latency for strong consistency. AP systems like DynamoDB and Cassandra optimize for low latency, accepting eventual consistency.

PACELC: When no partition (Else), consistency and latency trade off. CP systems (etcd, Spanner) choose consistency; AP systems (DynamoDB, Cassandra) choose low latency. Per-operation tuning (quorum reads, read repair, caching) bridges the gap.

This is where most production complexity lives. A Cassandra cluster can tune read consistency per query: CONSISTENCY ALL for critical reads (slower but consistent), CONSISTENCY LOCAL_ONE for analytics reads (very fast, stale). etcd lets you read from the leader (consistent, ~15ms) or from a local replica (much faster, slightly stale). Spanner offers two APIs: external consistency (strong, slower) and eventual consistency (fast, weaker).

The PACELC tradeoff is not binary. It is continuous. You are not picking a system and getting one answer. You are tuning every operation to the latency and consistency it deserves.

The Practical Implementation

In production, this means:

  • Quorum writes for critical paths. If a write must be consistent, wait for quorum (majority of replicas). Sacrifice availability on minority-side clients.

  • Quorum reads where needed. For consistent reads, contact quorum. For fast reads, contact one replica and accept staleness.

  • Eventual consistency with merge strategy. If you choose AP during partition, define how conflicts merge: last-write-wins (simplest, lossy), vector clocks (complex, preserves causality), or custom application logic.

  • Read repair and anti-entropy. After conflict resolution, propagate the merged state to all replicas. Cassandra does this automatically; etcd does not (it assumes no conflicts exist).

  • Timeouts and health checks. Decide how long to wait for quorum before timing out and falling back to AP behavior. Too long and availability suffers. Too short and you pay reconciliation costs.

The CAP theorem does not tell you to build a system that is “consistent” or “available.” It tells you to understand the tradeoffs your system makes, and make them explicit.


The Partition is Not Academic

Partitions happen in production. A misconfigured firewall, a network upgrade, a failing switch, or a cloud provider outage can split your cluster. The question is not whether your system will face partition scenarios. The question is: when it does, will you lose money, data, or uptime? Design for partition awareness, not partition avoidance.

The CAP theorem is one sentence: under a network partition, you cannot guarantee both consistency and availability. It is not a menu of three equal choices. It is a constraint on what is physically possible. Understanding it means understanding that your distributed system is making tradeoff decisions — sometimes per query, sometimes system-wide — and your job is to make those decisions intentional and visible, not accidental and hidden.

Advertisement

Frequently asked questions

Can I pick two out of three in CAP theorem?

No. Partition tolerance is not optional on real networks — it will happen. What you actually choose per operation is: refuse writes during partition to keep data consistent (CP), or accept writes and reconcile the divergence later (AP). PACELC shows the additional tradeoff between latency and consistency when there is no partition.

What is a network partition?

A network partition is when a subset of the cluster cannot communicate with the rest. Messages are dropped, timeouts occur. This is common in production: GCP once had a 18-minute partition between zones, AWS EBS saw network blips lasting seconds. It is not a theoretical scenario — your system must handle it or lose data.

What does consistency mean in CAP?

Consistency (in CAP) means linearizability: every read reflects all writes that completed before it. If you write v=99 and the write succeeds, the next read sees v=99. Under partition, achieving this requires quorum: refuse the write if you can't reach a majority of replicas. Weak consistency (eventual consistency) relaxes this and allows temporary divergence.

Why do databases like DynamoDB and Cassandra choose AP?

They prioritize availability and latency over strong consistency. During partition, they accept writes on any replica and merge diverged copies later (eventual consistency). For workloads like advertising impressions, cache layers, or activity feeds, accepting a few seconds of stale data is worth sub-millisecond responses at 99.99 percent uptime.

How does PACELC relate to CAP?

PACELC extends CAP: If a partition (P) occurs, else (E) choose between latency and consistency. Under no partition, every read/write operation still trades off latency (fast local reads) against consistency (quorum reads, expensive synchronization). Systems tune this with consistency levels, read repair, quorum configurations, and caching strategies.

Sources & further reading

/* Comments */