project · Level 2 · 35 min
Design and implement a simple rate limiter: given a user/key and a limit (e.g. 100 requests per minute), return whether the request is allowed or throttled.
In-memory is fine. Explain how you would scale to multiple servers.
Code for the rate limiter plus a short note on distributed rate limiting.