Rate Limiting
Rate limiting caps how many requests a user, device or address can make to a website or API in a set time, which slows down brute force attacks, scraping and abuse, and keeps services from being overwhelmed.
Also called: throttling, API rate limit, request limiting
What is rate limiting?
Rate limiting sets a ceiling: for example, no more than five login attempts per minute per account, or 100 API calls per minute per key. Requests over the limit are delayed or rejected, usually with an HTTP 429 "Too Many Requests" error. NIST requires systems to limit failed login attempts, and OWASP lists missing rate limits ("unrestricted resource consumption") among its top API risks.
What rate limiting protects against
- [Brute force](/glossary/brute-force-attack/) and [credential stuffing](/glossary/credential-stuffing/) on login and password reset pages.
- Scraping of prices, listings or customer data.
- API abuse and runaway costs, especially for paid services like SMS sending or AI calls that an attacker can trigger.
- Application-layer [DDoS](/glossary/ddos-attack/) floods.
- Enumeration, such as testing which email addresses have accounts.
Where to apply it
- Login, signup, password reset and MFA endpoints.
- Search, export and other expensive operations.
- Every public API, per key and per user.
- Forms that send emails or texts, to prevent them being used for spam.
How to implement it
Most web application firewalls, CDNs and API gateways provide rate limiting without code changes. Set limits per account and per IP, combine them with bot detection, and monitor how often limits are hit to spot attacks.
Related terms
Sources
Drafted with AI assistance, then edited and fact-checked by a person. How we use AI.
