Archivedistributed-systems
Linearizability vs Serializability
One is about real-time order of single operations, the other about equivalent serial execution of transactions.
- Published
- Reading time
- 1 min read
These two words get swapped constantly, and the confusion hides real design choices.
Linearizability is a single-object (or single-operation) property: every operation appears to take effect atomically at some point between its invocation and response, consistent with real time. If A completes before B starts, A is ordered before B.
Serializability is a transaction property: the concurrent execution of transactions is equivalent to some serial order of those transactions. It says nothing about wall-clock time.
They are orthogonal
| Serializable | Not serializable | |
|---|---|---|
| Linearizable | strict serializability (Spanner, etcd txns) | linearizable registers, no multi-op transactions |
| Not linearizable | snapshot isolation with write skew prevention | read committed |
Strict serializability = serializability + real-time order. That is what people usually mean by "strong consistency" in a database, and it is the most expensive combination.
Takeaway: say which property you mean. "Strongly consistent" is not a specification; it is a mood.