Design a rate limiter
OracleSoftware Engineer · OnsiteLast updated
This question evaluates a candidate's ability to design scalable, correct distributed rate limiting mechanisms, testing competencies in distributed systems, concurrency control, API gateway behavior, observability, and configurability within the System Design domain.
Design a rate limiting system for an API gateway.
Your design should address:
- Rate limits such as "N requests per second/minute" per key (e.g., per user, per IP, per API token).
- Correctness under concurrency and bursty traffic.
- Operation in a distributed, multi-instance gateway.
- What happens on limit exceed (HTTP status, headers, retry guidance).
- Observability and configurability (different limits per endpoint/customer tier).
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.