advancedSystem Design120 of 132
Rate limiter for a public API on 40 servers: where does the counter live and where is the race?
Tests whether you know a per-server in-memory counter is wrong across 40 servers (each enforces its own limit independently, so the real aggregate limit is 40x higher than intended), and that the counter must live in a shared store like Redis using an atomic INCR with TTL to avoid a check-then-increment race.
Ready to design this system end to end?
Generate a complete, structured system design answer — requirements, capacity estimation, API design, architecture, database choice, scaling, caching, fault tolerance, security, trade-offs, and more, walked through the way a strong senior engineer would in a real interview.
Sign in to generate a response