Consistency models
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
tell the four common consistency models apart with Shop examples.
Planned topics
- Strong (linearizable): every read sees the latest completed write, as if there were one copy. Costs latency and availability.
- Eventual: if writes stop, all replicas converge. Reads in between may be stale.
- Causal: if B happened because of A, nobody sees B without A (a reply never appears before its question).
- Read-your-writes: after you write, your own reads see it, even if others lag.
- Pick per operation, not per system.
Draft outline details
Demonstration
| Shop case | Needed |
|---|---|
| Decrement last unit of stock | strong (single writer) |
| Product page view count | eventual |
| "My order" after checkout | read-your-writes |
| Comment and its reply | causal |
Check your understanding
A customer places an order and the order list does not show it. Which guarantee is missing?
Show answer
Read-your-writes.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.