rate limiting

Capping how many requests a client may make in a period of time, and rejecting or delaying the rest.

In more detail

A policy has a scope, such as a user, key, address or resource, and a limit per time window or a sustained rate with room for short bursts. Servers use it to protect shared capacity from overload and abuse. HTTP APIs reply 429 Too Many Requests, often with a Retry-After header, and clients should back off before trying again.

Examples

A simple sliding-window limiter keeps a deque of recent request times, drops those older than the window from the left, and refuses a request when the deque is full.
X-RateLimit-Limit: 2
HTTP/1.1 429 Too Many Requests
Retry-After: 1

Related terms

Taught in

References

Certification courses