What CAP actually says

Distributed systems Mid-level Python 3.13+ PostgreSQL 17+ Reviewed By Best Latest Apps

Pick the fix

A teammate's design doc says: 'Our three-region store picks consistency and availability, sacrificing partition tolerance.' Best correction?

Options
Hint 1 of 1

Can a network promise never to drop messages?

Choose an answer, then open Show answer below to check it.

Show answer

Answer: A Partitions will happen; say what each operation does during one: reject (CP) or serve possibly stale data (AP)

Correct. Partition tolerance isn't something a networked system can give up.

In a networked system, partitions aren't optional, so 'giving up P' isn't a real choice. CAP only bites during a partition, when each operation either refuses (consistent) or answers with possibly stale data (available).

Why not the others?
  • B Change it to 'picks availability and partition tolerance'. Maybe true, but it keeps the 'pick two' framing instead of describing behaviour.
  • C Add a fourth region to avoid partitions. More regions mean more links that can fail.
  • D Use two-phase commit to get all three. 2PC blocks during a partition; it's a CP choice.

30-second answer

CAP says that when a network partition splits replicas, a system must choose between consistency (every read sees the latest write, linearizably) and availability (every request to a live node gets a non-error answer). Partitions aren't optional in a real network, so the real choice is what to do during one: refuse some requests (CP) or answer with possibly stale data (AP). Without a partition you can have both.

Practise saying it · 40 s. No recording, just a timer

Explain CAP correctly.

Say your answer out loud, then check which of these points you covered:

  • C is linearizability
  • A is every live node answers
  • Partitions aren't optional
  • Choose behaviour during a partition
  • PACELC adds latency

Deep dive

CAP's C is linearizability, not the C in ACID.

CAP's A is strict: every non-failing node must answer. Many 'CP' systems are still highly available in practice because partitions are rare and brief.

PACELC extends it: if Partitioned, choose A or C; Else, choose Latency or Consistency. That 'else' trade-off matters every day.

Real systems often choose per operation: a bank balance read can be CP while a product catalogue is AP.

Common mistakes

  • Saying 'we chose CA' for a distributed database.
  • Treating CAP as a property of a whole product rather than of specific operations and settings.
  • Using CAP to discuss latency, which it doesn't model; that's PACELC.

Senior take & follow-ups

Define C and A precisely, say partitions are given, then frame it as a per-operation choice and mention PACELC.

Follow-up questions

Think of your answer first, then open the hint.

  1. Is a single-node PostgreSQL CA?

    Show hint

    There's no partition between replicas to tolerate; CAP is about replicated data.

  2. Where does Cassandra sit?

    Show hint

    It's tunable per query: consistency levels trade latency and availability for consistency.

Suggest a fix if something here is wrong or out of date.