Code RoomDistributed counter store
HardPrep Room Coding #3414

Distributed counter store

System designDistributed systemsMid–Senior~40 min

Design a distributed counter store for a global product that tracks per-object metrics (video views, post upvotes, ad impressions) where a few objects receive 500k increments/sec while millions of objects receive a handful, and the same counter is incremented from multiple regions concurrently. Reads tolerate a few seconds of staleness; increments must never be lost and must converge to the correct total. A single row per counter is a write hotspot that will melt one shard. Design the increment and read paths.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.