InterviewLegend

Design a Distributed Rate Limiter

Signature problem
Alex Chen45 min readAdded 557 real interview reports

A rate limiter sits in front of an API and answers one question for every request: does this caller have allowance left? If yes, the request goes through. If no, it gets 429 Too Many Requests and a hint about when to try again. On one server that's a counter in memory and a few lines of code.

It gets hard when the API runs on hundreds of servers and the limit belongs to the caller. A client's requests land on whichever server the load balancer picks, so no single server sees the whole picture. Every server still has to agree, within a few milliseconds, on whether request number 101 is one too many.

Candidates report this prompt at L5, either as its own design round or as a design discussion inside a coding round, which is how an April 2026 L5 loop ran it. At L6 it showed up as a quota-limiter design in a Staff candidate's virtual first round in July 2026. It can also come up in SRE loops. Standard L4 loops have no design round. One candidate reported this prompt in an L4 design round, possibly the newer solution-design round some team-specific L4 loops now add, so ask your recruiter whether yours has one. The variants change the flavor. One is a QPS limiter (queries per second) with a burst allowance. Another is a limiter service that many internal teams share. L5 candidates in 2026 also reported a version that meters AI usage in tokens instead of requests, whether an agent's billing tokens or a model's output tokens. This lesson builds the public API version and covers the others as deep dives.

The Google angle
Google Cloud publishes its quota model, and it maps onto this prompt. Rate quotas cap speed, allocation quotas cap holdings, and the Drive API charges per method. A read costs 5 units, a list 100, a download 200. So "how would you limit by cost?" and "how do a user's and a project's limits stack?" are natural follow-ups to prepare.

GooglePremium lesson · System design round

The Google design, worked end to end.

  1. The API and data modelSystem design · Signature problem
  2. The design, drawn out1 diagram
  3. 6 deep divesWith the tradeoffs
Get the Google questions

$49 a year · all 107 companies · instant access

557 Google interview reports · guide updated

Google interview guide

Know what Google asks before you walk in.

34 coding · 8 system design · 33 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Google interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.