interviewmind

Practice room

Call time 00:00Get the app
D
Dana · Interviewer
You
You
Captions

Press Play and Dana asks the question out loud.

Questions4/17

System design

Design a rate limiter

Design a rate limiter for a public REST API. Each API key may make 1,000 requests per minute. A request over the limit gets 429 Too Many Requests with a Retry-After header.

The API runs on many stateless servers behind a load balancer and peaks at about 50,000 requests a second.

Things to cover

  • The algorithm: fixed window, sliding window or token bucket
  • Where the limiter runs, and where the counts live
  • Keeping counts consistent across servers
  • What happens when the counter store is slow or down

Tab indents. Press Escape, then Tab, to move focus out of the editor.

MarkdownLn 1, Col 1
Practice room — InterviewMind