← All topics
Quiz: Design a Rate Limiter: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which algorithm lets a client send a short burst and then limits it to a steady average rate?
- Q2. What does this print? (code)
- Q3. A limit of 5 per minute uses fixed windows. What is the most requests a client can get through in about 2 seconds?
- Q4. What is the main cost of the sliding window log algorithm?
- Q5. Ten API servers each keep their own in-memory counter for a "100 per minute" limit. What can happen?
- Q6. Why is Redis INCR suitable for a shared counter?
- Q7. What does this print? (code)
- Q8. Many students on one college Wi-Fi are blocked together. What is the likely cause?
- Q9. The Redis server behind a general API rate limiter crashes. What do most products choose?
- Q10. Which response should a rate-limited request get?
- Q11. How much does a token bucket need to store for each client?
- Q12. What does this print? (code)
- Q13. Why is a token-bucket update run as a Lua script inside Redis?
- Q14. Why does the fixed-window Redis key get an EXPIRE?
- Q15. Where is a rate limiter usually placed?