Engrain by ByteRush

SD.09.02 Mid-level

Rate limiting and abuse protection

Comes up in: Backend design

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • token bucket, leaky bucket, fixed/sliding window
  • per-user/IP/key limits
  • distributed rate limiting
  • returning 429 with Retry-After
  • bots and CAPTCHAs/Turnstile

Words you will know

rate limitingtoken bucket429

What you will practise

  • design an API rate limiter

Interview questions this answers

  • Design a rate limiter for a public API.