Learn the vocabulary of preserving cause-and-effect order between related writes across replicas.
0 / 5 completed
1 / 5
At standup, a dev mentions a consistency model where, if one write happens because of an earlier write, every replica must observe them in that same cause-and-effect order, even though unrelated writes may be seen in different orders on different replicas. What is this model called?
Causal consistency is exactly this: it guarantees that if one write causally depends on an earlier write, such as a reply depending on the comment it replies to, every replica observes them in that same order, while unrelated, concurrent writes may still appear in different orders on different replicas. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This preserve-cause-and-effect-only approach is exactly why causal consistency avoids the confusing 'reply before the original comment' problem without paying for full global ordering.
2 / 5
During a design review, the team adopts causal consistency for a comment thread, specifically because preserving the order between a comment and its reply avoids a reply ever appearing before the comment it responds to. Which capability does this provide?
Causal consistency here provides preserved cause-and-effect ordering without the cost of full global ordering, since only causally related writes, like a comment and its reply, must be seen in order, while unrelated, concurrent writes can still be reconciled cheaply without coordinating a single global order. A model with no ordering rules at all could let a reply be visible before the comment it responds to, which is confusing to readers. This causally-related-only ordering is exactly why causal consistency is favored for social and collaborative features.
3 / 5
In a code review, a dev notices a comment-thread feature replicates writes with no ordering guarantee at all, letting a reply occasionally render before the comment it responds to on some replicas, instead of using causal consistency to keep dependent writes in order. What does this represent?
This is a missed causal-consistency opportunity, since preserving the order between a comment and its reply would prevent the reply from ever appearing before the comment it depends on. A cache eviction policy is an unrelated concept about discarded cache entries. This no-ordering-guarantee pattern is exactly the kind of confusing bug a reviewer flags once causally dependent writes are involved.
4 / 5
An incident report shows users were confused when replies to comments occasionally appeared before the comments themselves on certain replicas, because the system replicated writes with no guarantee that causally related writes stay in order. What practice would prevent this?
Adopting causal consistency guarantees a reply is always observed after the comment it depends on. Continuing to replicate writes with no ordering guarantee at all regardless of how often replies appear before the comments they depend on is exactly what caused the confusion described in this incident. This causal-ordering guarantee is the standard fix once dependent writes are confirmed to need consistent ordering.
5 / 5
During a PR review, a teammate asks why the team reaches for causal consistency instead of full strong consistency, given that strong consistency would also prevent a reply from appearing before its comment. What is the reasoning?
Causal consistency only needs to coordinate ordering between writes that are actually causally related, which is far cheaper and more available than strong consistency, which must coordinate a single global order across every write in the system regardless of whether the writes are related. This is exactly why causal consistency is chosen when only cause-and-effect ordering matters, while strong consistency remains reserved for cases that truly need a single global order.