🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. Which algorithm lets a client send a short burst and then limits it to a steady average rate?
  2. Q2. What does this print? (code)
  3. Q3. A limit of 5 per minute uses fixed windows. What is the most requests a client can get through in about 2 seconds?
  4. Q4. What is the main cost of the sliding window log algorithm?
  5. Q5. Ten API servers each keep their own in-memory counter for a "100 per minute" limit. What can happen?
  6. Q6. Why is Redis INCR suitable for a shared counter?
  7. Q7. What does this print? (code)
  8. Q8. Many students on one college Wi-Fi are blocked together. What is the likely cause?
  9. Q9. The Redis server behind a general API rate limiter crashes. What do most products choose?
  10. Q10. Which response should a rate-limited request get?
  11. Q11. How much does a token bucket need to store for each client?
  12. Q12. What does this print? (code)
  13. Q13. Why is a token-bucket update run as a Lua script inside Redis?
  14. Q14. Why does the fixed-window Redis key get an EXPIRE?
  15. Q15. Where is a rate limiter usually placed?