Rate limiting is an important security measure that restricts how clients consume web applications, APIs, and LLMs. It controls how often a client accesses a network or resource, or performs certain actions, within a specified timeframe. As a result, organizations commonly use rate limits to help prevent abuse from both human users and automated bots — a key threat to application performance and availability.
In load balancing, the load balancer itself may support rate limiting without requiring extra infrastructure components. When activity is too high, the load balancer enforces a temporary "cooldown" period during which a client's requests are denied or ignored (or otherwise limited by CAPTCHA challenges).
How does rate limiting work?
Rate limits are highly configurable and primarily couple request volumes with a client IP address. A load balancer can use "stick tables" to store each client's request rates. These storage locations are in-memory on the load balancer itself and count the total amount of times important network events occur. Additionally, stick tables can track error rates to help support ACL expressions and rate limit failed login attempts or provide circuit-breaking functionality (supporting rate limiting).
When a specific source IP makes too many requests too quickly, their requests aren't fulfilled. Users may or may not receive a warning to reduce their activity or a challenge to prove they're human, indicating that the system has flagged their behavior as suspicious.
Because of that, rate limits are important countermeasures against brute force attacks, DDoS, DoS, and web scrapers. API abuse is also a common concern, which can happen purposefully through intentional overuse or accidentally. In a real-life scenario, a human user who has exceeded their limits might not see their app content load as expected.
You’ve mastered one topic, but why stop there?
Our blog delivers the expert insights, industry analysis, and helpful tips you need to build resilient, high-performance services.
Does HAProxy support rate limiting?
Yes! Global rate limiting in HAProxy Enterprise load balancer uses stick tables to track activity per client, including request counts, errors, and page access over a configurable time period. The Global Profiling Engine aggregates stick table data across all your HAProxy Enterprise nodes and shares the results, so rate limits apply consistently across your clusters.
Explore our DDoS protection and rate limiting solution, see four examples of HAProxy rate limiting, or read our Global Profiling Engine documentation to learn more.