Skip to content
Theory · Rate limiter · lesson 1 of 10

Problem and requirements

Three turnstiles take tokens from one shared bucket a tap refills at 100/min; without a token the letter bounces back with 429

The prompt reads like this. Design a rate limiter for a public HTTP API. Every request passes through one of many API gateway instances, and each client may make only a certain number of requests a minute. A client over its limit is refused, and every other request goes through as fast as before. Before reading on, try to finish the diagram.

In this lesson

  • Why ask
  • Functional requirements
  • Non-functional requirements
  • What stays out of scope
  • Common mistake
  • Key points