Skill Zuno · skillzunos.com · System Design
Rate Limiting interview questions
Prepare for Rate Limiting interviews on Skill Zuno. This practice book covers Rate Limiting interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open Rate Limiting on Skill ZunoAlso see the Rate Limiting tutorial.
Rate limiting caps how many requests a client can make in a period of time. It protects services from overload and abuse, ensures fair use between customers and controls cost. Designing a distributed rate limiter is a common interview question that covers algorithms such as token bucket and sliding window, where to enforce limits, and keeping counters consistent across servers.
Sample Rate Limiting interview questions
How does the token bucket algorithm work?
A bucket holds up to B tokens and refills at R tokens per second. Each request takes a token; if none remain, it is rejected. It allows bursts of up to B while keeping the average rate at R.
What is the problem with fixed window counters?
A client can send the full limit at the end of one window and again at the start of the next, briefly doubling the allowed rate. Sliding window logs or counters smooth this out.
How do you rate limit across many servers?
Keep counters in a shared store such as Redis and update them atomically with INCR and EXPIRE or a Lua script. For very high scale, servers can keep local counters and sync them periodically, accepting small inaccuracies.
What should the API return when a client is rate limited?
HTTP 429 Too Many Requests with a Retry-After header, plus headers showing the limit, the remaining requests and the reset time, so clients can back off correctly.
Should a rate limiter fail open or fail closed?
Usually open: if the counter store is down, allow traffic rather than block every user. For security-critical limits such as login attempts, failing closed may be safer.
What you can practice
- Rate Limiting interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- System Design topics alongside Rate Limiting on skillzunos.com