Lesson 11 of 14
25. Rate Limiting

Interview questions

6 min read+10 XP

Interview questions (with the counter-questions you'll get)

Q1. Design a rate limiter.

They're testing: the classic question, end to end.

Think about your answer first, then open it.

reveal

Q2. Compare token bucket, leaky bucket, fixed window, sliding log and sliding window counter.

They're testing: algorithm knowledge.

Think about your answer first, then open it.

reveal

Q3. How do you rate limit across many servers?

They're testing: distributed state.

Think about your answer first, then open it.

reveal

Q4. Fail open or fail closed when the rate limiter's store is down?

They're testing: judgement under failure.

Think about your answer first, then open it.

reveal

Q5. What should the API return when a client is rate limited?

They're testing: client experience.

Think about your answer first, then open it.

reveal

Q6. How do you stop credential stuffing?

They're testing: security thinking.

Think about your answer first, then open it.

reveal

Q7. How would you rate limit by cost rather than by request count?

They're testing: nuance.

Think about your answer first, then open it.

reveal

Q8. Where would you put rate limiting in an architecture?

They're testing: layering.

Think about your answer first, then open it.

reveal

Q9. How do you handle limits for clients behind one shared IP?

They're testing: real-world awareness.

Think about your answer first, then open it.

reveal

Q10. Design a rate limiter as a service used by many teams.

They're testing: scaling the idea (Chapter 32 covers it fully).

Think about your answer first, then open it.

reveal