NoSQL · Data models beyond tables

What does the CAP theorem actually say?

Mediumcap theoremconsistencypartition toleranceUpdated Oct 2026
Quiz this track

Short answer

During a network partition a distributed system can preserve consistency or availability, not both. Partition tolerance is not optional in a real distributed system, so the practical choice is CP versus AP behaviour.

Consistency in CAP means linearizability: every read sees the most recent completed write. Availability means every request to a non-failed node receives a non-error response. Partition tolerance means the system keeps operating despite dropped messages between nodes.

Networks partition. If a node cannot reach its peers, it must either reject some requests to avoid returning stale data, or answer with possibly stale data. That is the real decision. A system can be consistent and available when the network is healthy, which is why CAP alone is a coarse tool.

CP and AP in practice

  • CP during a partition: minority replicas refuse writes, so clients see errors or higher latency instead of divergence
  • AP during a partition: replicas keep accepting writes locally and reconcile later, so reads may be stale
  • Leader-based systems are usually CP for writes; leaderless quorum systems can be tuned toward either side
  • CAP says nothing about latency when the network is healthy, which is often the more important trade-off
text
Healthy network:  C and A can both hold
Partition:        choose C or A for the affected operations
PACELC:           if Partition, trade A vs C
                  else trade Latency vs C

PACELC extends the idea: when there is no partition, the trade-off is latency versus consistency. A quorum read that waits for a slow replica is choosing consistency over latency, even though no partition exists.

Do not say a database is simply CA. That only describes behaviour with no partitions, which is not a useful guarantee for a distributed deployment. Describe the operation and the failure mode instead.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What is the difference between CAP consistency and ACID consistency?
  2. 2How does PACELC refine CAP?
  3. 3Can a system be CP for writes and AP for reads?
  4. 4Why is partition tolerance not really optional?

Say it in the interview

CAP says that when a network partition happens, a distributed system has to choose between consistency and availability for the affected operations. Partition tolerance is unavoidable in a real deployment, so the meaningful choice is whether a minority replica rejects requests or serves possibly stale data. I also bring up PACELC, because when the network is healthy the trade-off becomes latency versus consistency. I would describe the behaviour per operation rather than label the whole database.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live NoSQL mock interview and get scored feedback on depth, clarity and confidence.