What is rate limiting in network security? Learn how firewalls use it to keep services available during traffic spikes and how to spot rules that block users.
👉 Master your Security+ skills with Pluralsight here: Pluralsight
You’ll learn what rate limiting is in network security, how firewalls use it to protect service availability, and how to tell when a rule might block legitimate users.
Chapters: 0:00 Intro 0:13 What does rate limiting protect? 0:49 How does a rate-limiting rule work? 1:40 Where do firewalls enforce rate limits? 2:41 When can rate limiting block legitimate users? 3:48 Outro
Disclaimer: The rate limit shown is illustrative, not a recommended setting.
Affiliate notice: Some links may earn a commission. Thanks for your support.
Key Takeaways
Rate limiting protects service availability by capping how much otherwise-allowed traffic a system accepts over time. Hitting the limit doesn’t prove the traffic is malicious.
A rate-limit rule defines what counts, who shares the allowance, how much is allowed over what period, and what happens to excess traffic. The counting algorithm determines how short bursts are handled.
Set the limit where the relevant activity is visible. Network firewalls can count packets or new connections; web and API controls can limit requests by endpoint or authenticated customer.
HTTP 429 Too Many Requests signals that a client hit a rate limit. Clients should honor Retry-After when present; a network firewall may simply drop packets.
Shared IP addresses can cause legitimate users to be blocked together. Use per-account limits where practical, test in count-only mode during busy periods, and monitor latency and task completion after enforcement.
Application-level limits can’t protect an already-saturated internet link. That requires protection farther upstream.
👉 Put your security knowledge into practice with Pluralsight through guided labs, feedback, and certification practice exams.
Rate limiting controls how much activity a system accepts over a period of time. A firewall might allow a connection under its access rules but turn it away because too many new connections are arriving at once. The access rule answers “Is this traffic allowed?” The rate limit answers “How much of it can we accept right now?”
In network security, rate limiting primarily protects availability: it helps keep a service usable during a traffic surge. The surge could come from an attack, a popular ticket sale, or a faulty app stuck in a retry loop. Exceeding a limit tells you the traffic came in too fast for the configured rule. It does not tell you why.
How does a rate-limiting rule work?
Imagine a reporting service that allows each signed-in customer and rejects requests above that limit. The number is illustrative, not a recommended setting. To understand this rule, or any rate-limiting rule, ask four questions:
FAQ
Quick answers to the questions people usually ask about this topic.
How do you choose a rate limit for an API endpoint?
Use two measurements: how much traffic the backend can handle without slowing down or failing, and how much legitimate traffic arrives during normal peaks. Set a threshold that leaves room for expected bursts while protecting backend capacity. If those goals conflict, consider separate limits for costly operations rather than one limit for the entire API.
Can rate limiting and load balancing work together?
Yes. Load balancing spreads requests across servers, while rate limiting controls how much traffic those servers accept. If each server keeps its own counter, a per-customer limit may not apply consistently across the service. To enforce one shared allowance, use a gateway or limiter that coordinates counts across instances.
Can a rate limit improve availability even if some requests are rejected?
Yes. Rejecting excess requests can keep the backend responsive for requests it does accept. Check whether latency and timeouts fall and whether users complete more sign-ins, checkouts, or other key tasks. A rise in 429 responses shows the limit is being enforced, not whether it improved availability.
How should an API client retry after being rate limited?
If a 429 Too Many Requests response includes Retry-After, wait at least that long. If it does not, follow the API's documented retry policy. When retries are safe and no policy is documented, use progressively longer delays with a small random variation so clients do not all retry at once.
How can I practice applying network security controls after learning about rate limiting?
If you're ready to move beyond explanations, explore guided security labs with Pluralsight. The labs and feedback help you apply foundational security concepts, while assessments and practice exams can show you what to focus on next.
Some links may earn a commission. Thanks for your support.
Watch in the video playerOpen the dedicated player for this course.
60 report-status requests per minute
Question
What it means in this example
What counts?
Requests to the report-status endpoint count. Other actions, such as generating a report, are not part of this rule.
Who shares the allowance?
Each authenticated customer gets a separate allowance. The field used to group activity is the counting key. Other rules might use a source IP address, an account, or a validated API key.
How much activity is allowed, and over what time?
The limit is 60 requests per minute. The counting algorithm determines how that minute is measured and how bursts are handled.
What happens to excess traffic?
The service rejects it. Depending on where a rule runs and how it is configured, a limiter might instead drop packets, delay work in a bounded queue, or challenge a web request.
A rate limit is the policy. Throttling often describes what happens when the policy is enforced, though product documentation sometimes uses the terms interchangeably.
What does HTTP 429 Too Many Requests mean?
At the web layer, 429 Too Many Requests tells the client it has exceeded a rate limit. The response may include a Retry-After header. For example, Retry-After: 30 tells the client to wait 30 seconds before trying again. An API client should respect that delay rather than immediately resending the request.
Not every rate limit produces a 429. A network firewall that drops packets does not send an HTTP response, and a web application firewall may be configured to issue a browser challenge instead.
How firewalls use rate limiting at different network layers
Where a rule runs determines what it can see and count. A network firewall can count connections before they reach an application, but it typically cannot tell whether an encrypted web request is going to a sign-in page or a search page.
Where the limit runs
What it can count
Example
Network edge firewall (Layers 3–4)
Packets, bits, or new connections per second
Limit the rate of new TCP connections to reduce pressure on the systems that track them.
Web application firewall (WAF) or reverse proxy (Layer 7)
HTTP requests by path, method, or another visible request property
Apply a tighter rule to /login than to the rest of the website. The inspection point needs access to decrypted HTTP traffic.
API gateway or application (Layer 7)
Requests per authenticated client, or activity the application can distinguish, such as failed sign-ins per account
Give each customer a separate API allowance or slow repeated failed sign-in attempts against an account.
Rate limiting works best when the rule measures the activity that puts the service at risk. An API gateway can keep one customer’s traffic from consuming a shared service’s capacity, while an application can limit costly report exports separately from inexpensive status checks. On a sign-in page, a limit can slow repeated password guesses, but it does not verify anyone’s identity or replace stronger authentication.
Common rate-limiting algorithms
Two rules that both say “60 requests per minute” can handle the same burst differently. The difference is how they count activity or replenish the allowance.
Algorithm
How it works
What it means for bursts
Fixed window
Counts requests in separate intervals, such as each clock minute, and resets the counter at the boundary.
Requests just before and just after a reset draw from separate allowances, so the rule can admit a large burst across the boundary.
Sliding window
Counts or estimates activity over a rolling interval, such as the preceding 60 seconds.
A new clock minute does not erase recent activity, so enforcement has no abrupt clock-minute reset.
Token bucket
Adds tokens at a steady rate up to a fixed capacity. Each accepted request spends a token.
Saved tokens allow short bursts. Once the bucket is empty, the refill rate determines how quickly more requests can be accepted.
Leaky bucket (queue model)
Holds incoming work in a bounded queue and releases it at a controlled pace.
Smooths short bursts by adding wait time. Once the queue is full, new arrivals are rejected.
A rate limit is also different from a quota or a concurrency limit. Ten requests per second is a rate. Ten thousand requests per month is a usage quota. Ten jobs running at once is a concurrency limit. If slow reports are tying up workers, limiting how many jobs can run at once may address the bottleneck more directly than counting how many start each second.
When rate limiting blocks legitimate users
A common problem is treating one public IP address as one person. An office or school can put many people behind the same public IP through network address translation (NAT). If the rule counts by IP alone, one busy team can use up the allowance for everyone sharing that address. Where authenticated identities are available, a per-account or per-customer limit can give those users separate allowances.
The opposite problem arises when traffic comes from many sources. A service can be overwhelmed even when each source stays below its individual limit. And if a distributed denial-of-service (DDoS) attack saturates the internet link, an application-level rule cannot free up bandwidth that has already been consumed. Protection farther upstream is needed in that situation.
How to check a rate limit before and after enforcement
Name what you want to keep working. For example, if report generation is the bottleneck, measure report starts rather than grouping them with lightweight status checks.
Check who shares the counter. Determine whether the rule groups unrelated users by IP address and whether counters are shared across locations or maintained separately in each data center.
Put your network security knowledge into practice
If you understand rate limiting on paper but want practice applying security concepts, Pluralsight is an optional next step. Guided security labs and feedback help you put concepts to work, while assessments and practice exams help you find gaps and decide what to study next.
Start in count-only mode if available. Observe which traffic would trigger the rule without blocking it. Include normal busy periods so you can see whether legitimate bursts would hit the threshold.
Watch user outcomes after enforcement. Track 429 responses where applicable, but also check backend latency and whether users can still complete tasks such as signing in or checking out. A spike in 429 responses shows that the limit is being hit; it does not tell you on its own whether the rule is helping.
Affiliate link — I may earn a commission at no additional cost to you.
Jay's Recommendation
Turn understanding into hands-on confidence
You've built the foundations. Pluralsight adds opportunities to practice in guided security labs, get feedback, and check your knowledge with assessments and practice exams, so your next step is more than another video.
đź› Put concepts to workBuild practical skills with guided security labs and feedback.
🎯Find your weak spotsUse assessments to focus on what needs more work.
📝Check your understandingUse practice exams to guide your certification preparation.
đź§Give study sessions directionOrganize further learning with curated paths and progress tracking.