Skip to content
System Designer

Stay up · 3 minutes

Saying "slow down" politely

A limit per client stops one noisy caller or a flood from taking everyone down.

Open this lesson
A limit per client stops one noisy caller or a flood from taking everyone down.

A bouncer, not a wall

One buggy script or an attacker can send more requests than the whole crowd. A rate limiter counts requests per client and answers the extra ones with a quick "too many requests" (HTTP 429). Everyone else is served as usual.

How it counts

Each request spends one token. Refill allows a short burst while putting a bound on a sustained flood.

Try the idea

A flood of junk traffic is hitting the servers. Add a rate limiter in front.

Key numbers

Limiter check
≈ 0.5 ms. in-memory counters, approx.
Typical API limit
≈ 1 to 100 requests a second per key. free public tiers are often about 5,000 an hour (1.4 a second); paid tiers far more, approx.
A modest flood
≈ 50 times normal. seen in real attacks, approx.

Check your reasoning

Think through these questions before opening the lesson. In the game you can test the idea and compare your reasoning.

  • What does a rate limiter send back to an over-limit client?
  • If the limiter fails, "fail open" means:
  • Why limit per client, not just in total?

The key point

Limit each caller so one flood cannot become everyone's outage.

Practise this idea

Continue through the lesson tracks