Skip to content
All concepts

Concept

Rate limiting

Rate limiting caps how many requests a client may make in a period of time. It protects a shared service from one caller taking more than its share, whether through a bug, a script or an attack. A refused request should say so clearly and say when to try again.

Watch the limiter keep one count per client for the current window, then start again when the window ends. A live step from the lesson Fixed vs sliding window (Rate limiter). Timings and counts are illustrative.

Where you'll see it

Sources: How we built rate limiting capable of scaling to millions of domains (Cloudflare, 2017) ↗ · Scaling your API with rate limiters (Stripe, 2017) ↗ · Report a problem

The definition is in our own words; the sources are those of the lesson Fixed vs sliding window.