System design primer: design a rate limiter, with real numbers
Most rate limiter answers I hear in mocks are one box on a diagram labelled "rate limiter" and then the candidate moves on. That box is the whole question. Let us do it properly, with numbers. Thanks to Kenji for reviewing the draft. 1. Requirements (spend 5 minutes here) Public API behind a gateway. 10 million daily active users. Limit: 100 requests per user per minute. Some endpoints (login, OTP) much stricter.…