NEW
A control technique that limits how many requests or actions a client can perform within a time window.
DESCRIPTION
Rate limiting protects services from abuse, overload, and noisy neighbors by capping request rates. Algorithms include token bucket, leaky bucket, and fixed or sliding windows. Limits can be applied per user, IP, API key, or tenant. It often runs at API gateways, load balancers, or edge networks. Well-designed policies return informative headers and status codes (e.g., 429 Too Many Requests). Distributed rate limiting requires consistent hashing, centralized counters, or CRDTs. Pair limits with authentication to prevent evasion. Observability is crucial to tune limits for fairness and performance. Rate limiting complements quotas and burst controls for resilient APIs.
ALTERNATIVE DEFINITIONS
Cloudflare
Rate limiting is a strategy for limiting network traffic. It puts a cap on how often someone can repeat an action within a certain timeframe — for instance, trying to log in to an account.
Frames rate limiting as a general strategy with concrete user action example.
Wikipedia
In computer networks, rate limiting is used to control the rate of requests sent or received by a network interface controller.
Emphasizes network-level control of request rates.
RELATED TERMS
Token Bucket Leaky Bucket Backpressure DDoS Protection API Gateway Retry with Backoff Fair Queuing Circuit Breaker
COMPETING TERMS
KNOWLEDGE AREAS
Software Engineering Data Security Data Integration & Interoperability Observability & Telemetry
TARGET AUDIENCE
DevOps Engineer Software Developer Cloud Architect MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Rate limiting
- IETF - HTTP 429 Too Many Requests
- Twitter Developer - Example API rate limits in practice
- Google Cloud - Strategies and algorithms overview
TOP QUESTIONS
Why is Rate Limiting important for APIs?
It protects availability and fairness by preventing abuse and overload. It also reduces infrastructure costs and improves multi-tenant isolation.
Category: Relevancy
What algorithms are commonly used for Rate Limiting?
Token bucket, leaky bucket, fixed window, and sliding window counters are common, each balancing burstiness and accuracy differently.
Category: Overview
Where should Rate Limiting be enforced?
At the edge (CDN), in API gateways, or service sidecars to stop excess traffic early and reduce backend load.
Category: Management
What’s the risk of overly strict Rate Limiting?
You may block legitimate users and degrade UX. Monitor and tune limits using real traffic patterns.
Category: Risk
How do Rate Limiting and throttling differ?
Rate limiting caps requests per time window; throttling slows or shapes processing. They’re complementary controls.
Category: Misunderstanding
What headers help clients with Rate Limiting?
Use standard or de facto headers like Retry-After and X-RateLimit-Remaining to communicate limits and reset times.
Category: Requirements
How do you Rate Limit in distributed systems?
Use centralized stores, consistent hashing, or sharded counters with eventual consistency. Consider approximate counters for scale.
Category: Management
What is a hot topic in Rate Limiting today?
Global rate limits at the CDN edge and adaptive limits based on user reputation or ML signals are trending.
Category: Topic
How should clients handle 429 Too Many Requests from Rate Limiting?
Respect Retry-After, back off with jitter, and avoid synchronized retries that cause thundering herds.
Category: How-to