Interview question. Design a counter that receives increments in two regions while the network link is down. When the link recovers, both regions must converge, even if state arrives more than once or in a different order. Explain the state representation, merge rule, what changes when decrements are allowed, and why the same design cannot safely sell a finite inventory.
Replication, Consistency & Consensus · Staff
How would you design a distributed counter that merges after an offline period?
Consistency, Causality and Convergence · Part 5 of 6 · 5 min read
Read the worked explanation ↓Part of paid interview preparation
The worked explanation, deeper discussion, timed interview exercise with assessment criteria, reasoning check, transfer exercise and spoken revision answer for this lesson are available to readers with paid access.
Checking your access…
About Interview Arena →