🔢Distributed Counter
0 nodes · 0 edgesHint 1 — locked
Hint 2 — locked
Hint 3 — locked
🔢
Distributed Counter
● Beginner15–20 min
Problem
Build a distributed counter service for tracking high-frequency events: YouTube view counts, Reddit upvotes, Instagram likes. Individual counters can receive millions of increments per second during viral events. The displayed count can be approximate but must eventually converge to the exact value.
Functional Requirements
- Increment a named counter atomically (e.g. post_123_likes)
- Read current counter value with < 50 ms latency
- Handle burst traffic (viral events: 1M increments/sec on a single counter)
- Persist counts durably — no loss on node failure
- Support counter reset and bulk read of multiple counters
Non-Functional
- 1M increments/sec per hot counter during viral events
- Displayed value can lag by up to 5 seconds (eventual consistency OK)
- 99.99% write availability — increments must never fail
- Exact count persisted eventually — no lost increments
Prerequisites
CachingEventual consistencyAtomic operations
🔢
Design your Distributed Counter
Drag components from the Brief panel → switch to Components tab
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
UML
15
Needs Work
Click a dimension to see what's missing. Score updates as you design.
Speed
RPS
Hit Play to start simulation00:00