Code Room
System designHard
Question
Design a globally-distributed counter/limiter that runs at the edge (200+ locations) for 'free article views per month' on a publisher's paywall — each user gets 5 free articles, enforced at the nearest PoP for low latency, but the count must be approximately consistent globally so a user can't get 200 free articles by hopping PoPs. Reads/writes happen at the edge; the origin is far. Describe the state model, the consistency you choose and why, how you reconcile concurrent increments across PoPs, and how you bound the over-count.
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.