---
title: "Consistency Models and the CAP Trade-off"
description: "Replica consistency describes what clients may observe. When network partitions can persist, a store cannot guarantee both linearizable operations and successful responses to every request at a non-fa"
canonical: https://lightmysky.com/learn/computing/consistency-models-and-the-cap-trade-off-mt_j6qtpYPHsr
source: https://lightmysky.com/learn/computing/consistency-models-and-the-cap-trade-off-mt_j6qtpYPHsr.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Consistency Models and the CAP Trade-off

Replica consistency describes what clients may observe. When network partitions can persist, a store cannot guarantee both linearizable operations and successful responses to every request at a non-failing node. Application requirements guide which guarantees its design must support.

Subject: Computing · Area: Networks & Security · Ages 20 to 22
Page: https://lightmysky.com/learn/computing/consistency-models-and-the-cap-trade-off-mt_j6qtpYPHsr

## Ready when they can

- Say what a client can observe under strong consistency and under eventual consistency
- Work out what each side of a partitioned system may do under each choice
- Choose a consistency model for a stated application and defend the choice

## Lesson: Replica agreement during a network split

Replicas hold copies of data. Here, strong consistency means linearizability: operations behave like one ordered copy, respecting real-time order. A read begun after a write completes must reflect that write or a later one. Overlapping operations may be ordered either way. This differs from transaction isolation, which governs how transactions interact.

*(drawing: No other write occurs. A later linearizable read cannot miss the completed write.)*

A partition prevents communication between replicas and may last indefinitely. CAP availability requires every request received by a non-failing node eventually to get a successful response. A timeout or refusal is not that guarantee. A store cannot guarantee both this availability and linearizability despite partitions. Preserving consistency may require delaying or refusing operations.

**Example.** Replicas R and S start at 4. A partition separates them. R completes a write of 9, then S receives a read. With no later write, returning 4 violates linearizability. S cannot learn 9 across the broken link, so guaranteeing consistency may require waiting or refusing the read. Depending on the protocol, one side or both may pause.

*(drawing: Returning the old value would violate the stated linearizability guarantee.)*

Eventual consistency permits disagreement. If updates stop and communication and reconciliation succeed, replicas eventually converge. It gives no fixed deadline and does not itself guarantee CAP availability. A basket may accept additions on both sides and merge by set union, which retains every distinct item from either side. Adding oats and milk separately then retains both. Removals need a defined conflict policy too.

Choose guarantees from each feature's rules. A debit that must not overdraw needs coordinated checks or another overspending-prevention design. A basket may tolerate stale views and a merge policy. Strong reads and writes do not make a read-check-write sequence atomic: two buyers can each read 3 seats and write 1 after reserving 2, making 4 reservations. Use an atomic check-and-update or another safe allocation rule.

**Recap.** CAP concerns linearizability and availability during partitions. Eventual convergence has conditions. Application rules also need suitable atomic operations and conflict policies.

*Lesson, questions and flashcards on replica consistency written for this dataset.*

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Consensus and Why Agreement Is Hard](https://lightmysky.com/learn/computing/consensus-and-why-agreement-is-hard-mt_cF-JiM_xRz)

## Optional connections

- [Isolation Levels and the Anomalies They Allow](https://lightmysky.com/learn/computing/isolation-levels-and-the-anomalies-they-allow-mt_utxPNgxveB)

## Opens up

- [Linearizability and Checking a History](https://lightmysky.com/learn/computing/linearizability-and-checking-a-history-mt_lTaHmlGtuo)
