Course contents
On this page
Lesson plan 26: Distributed consistency
Distinguish linearizability, serializability, strict serializability, causal guarantees, and session guarantees.
Placement: Part 5: Correctness across machines.
Prerequisites: Lesson 25: Distributed failure models, plus the earlier dependency chain.
Learning outcomes
- Distinguish linearizability, serializability, strict serializability, causal guarantees, and session guarantees.
- Explain CAP using a concrete partition and the theorem’s availability definition.
- Use PACELC as an architectural comparison while preserving workload and consistency assumptions.
- Separate a general mechanism, a documented implementation choice, and an illustrative numerical assumption.
Teaching sequence
- Establish the motivating situation: A user completes a write in one region then reads an old value from another.
- Introduce the vocabulary and the correctness obligation before an optimization. Define linearizability, serializability, strict serializability.
- Develop the mechanism: Construct legal histories for each guarantee and identify the availability decision during a partition.
- Follow the complete worked example: A replica lag of 2 s at 5000 writes/s corresponds to roughly 10000 unapplied writes. Explain the assumptions, intermediate units, and limiting interpretation.
- Extend the scenario to changed load, skew, or failure, explaining causal, session guarantees, CAP, PACELC.
- Connect the mechanism to a documented implementation and an alternative with a different workload fit. Close by stating the remaining cost and the next lesson dependency.
Required chapter material
Use a complete execution trace or worked calculation, supported by an annotated static diagram or table. Include language-neutral pseudocode or labeled SQL when it clarifies the mechanism. State preconditions, ownership, visibility, and failure boundaries for algorithms. Describe operational costs as well as the normal path. All questions raised in the narrative must be resolved in the text.
Visual explanation
A read/write history places invocation and response intervals on a timeline and shows which candidate order each guarantee permits. The accompanying prose explains the arrows, state changes, or table entries so the lesson remains understandable in a plain Markdown reader.
Editorial checks
Confirm that the numerical example agrees with its units and assumptions. Check that a faster path preserves the stated contract, or explicitly identify the changed guarantee. Keep hypothetical figures separate from product measurements. Explain both an appropriate use and a limitation of the case design. Check terminology against the glossary and links against the course index.