liveBook · Manning

Linearizability

As explained in Latency

Linearizability is a consistency property in which each operation appears to take effect atomically at a single point between its invocation and completion, preserving real-time order.

Linearizability is a strong consistency property that makes replicated data appear to have one authoritative copy. Each operation has one effect, and later operations observe the resulting state. It applies to individual operations on a single object, unlike serializability, which governs multiple operations across one or more objects. section 4.3.1

A linearizable key–value store

Consider three replicas. put(A, 1) establishes A = 1 everywhere; put(B, 2) adds B = 2; put(A, 3) changes A to 3 while retaining B = 2. After each completed operation, every replica represents the same state, so a request sent to another replica sees the acknowledged update. section 4.3.1 section 4.6

Use linearizability when the application needs:

  • A simple consistency model in which operations behave as though they access one copy of the data. section 4.3.1
  • Persistent acknowledged updates that remain visible after component failures. section 4.6
  • A deliberate latency trade-off: linearizability can be expensive, and weaker models may suffice for some workloads. section 4.3.1 section 4.9
Figure 4.1 An example of a linearizable key–value store with three replicas. Each of the replicas is in the same state after every operation because linearizability gives the illusion of a single copy of data being accessed and updated.
Figure 4.1: An example of a linearizable key-value store with three replicas. Each of the replica is in the same identical state after every operation because linearizability gives the illusion of a single copy of data being accessed and updated.

Inspect the three-replica sequence to see how every completed operation leaves replicas in the same state. section 4.3.1

How Latency covers it

How deep it goes
Defines operation scope, contrasts serializability, illustrates replica state changes, and notes implementation complexity and latency cost.
Examples
Uses put(A, 1), put(B, 2), and put(A, 3) across a three-replica key–value store.
What you can do after
Evaluate/understand when single-copy semantics justify linearizability’s latency cost and how replicated systems preserve acknowledged updates.
How it connects
Connects linearizability to strong consistency, serializability, replication, state machine replication, quorums, and weaker consistency models.

Also explained in

Compare how 4 books explain linearizability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.