Rate limiting is a control that caps how much an account, key, or address can do in a set window of time, such as requests per minute, tokens per hour, or simultaneous calls. It slows abuse and protects capacity, but it limits exposure rather than stopping a determined attacker.
What is rate limiting?
A rate limit is a speed limit for usage. The system counts what an entity does and, when the count passes a set number inside a time window, it slows or rejects further requests. Usually the caller gets an error telling them to wait.
The thing being counted can vary. It might be requests, tokens, concurrent calls, or spend. The entity being counted can vary too: a key, an account, an organization, or an IP address. Both choices matter a great deal for how well the limit works against abuse.
Rate limiting is a control, not a detection method. It enforces a boundary. Detection tells you something odd is happening, and the limit decides how much damage can happen while you find out.
How a limit gets set and enforced
Good limits come from four decisions:
- ScopeDecide what is counted Pick the entity, such as key, account, or organization, so one actor cannot dodge by switching to another.
- MeasurePick the unit and window Requests, tokens, concurrency, or spend, over a window short enough to stop a burst.
- EnforceAct at the boundary Slow, reject, or queue traffic over the limit, and tell callers clearly what happened.
- TuneReview and adjust Compare limits against real usage so real customers are not blocked and abusers do not have easy room.
Kinds of limits and where each falls short
Limit | What it caps | Where it falls short |
Requests per window | How many calls an entity can make. | A few very long, costly requests can stay under the cap. |
Tokens per window | How much model work an entity can consume. | Needs both input and output counted to be accurate. |
Concurrency | How many calls can run at the same time. | Does not limit total use over a longer period. |
Spend or budget cap | The total cost an entity can reach. | Enforcement can lag, so a limit can be overshot before it trips. |
Per-IP limit | How much one address can do. | Easily dodged with many addresses, and can block real users on shared networks. |
Per-account limit | How much one account can do. | Beaten by spreading traffic over many accounts. |
What it looks like in practice
Illustrative case: a provider caps each free account at a modest number of requests per minute. An abuser who wants far more simply creates hundreds of accounts and gives each one a small share, so no account ever hits the limit. The system sees nothing wrong.
The traffic only stands out when the team looks across accounts: all of them hover just under the cap, all share a handful of devices, and all send the same style of request. The limit did its job on each account and still failed against the operation as a whole. Limits need partners in the form of signals that look across accounts.
Why limits are necessary but not enough
Without limits, one runaway workload, bug, or attacker can burn through capacity or budget in minutes. Limits give you bounded exposure, and that is valuable. They also buy time for detection and review.
But a limit sees only what it is scoped to count. Attackers adapt by spreading usage across accounts, keys, and addresses, or by staying just under the cap. That is why limits work best as one layer, paired with signup checks, device and behavior signals, and cross-account linking that can see the operation behind the accounts.
What to watch in the data
- Usage hugging the limit. Many accounts or keys running just under the cap, steadily, which suggests someone is working around it.
- Limit errors in bulk. Spikes in rejected requests that come from a small set of origins.
- Limits keyed only to IP. A weak scope, since attackers can change addresses easily and real users share them.
- Budget overshoot. Spend that exceeds a cap because enforcement is slow to react.
- New accounts after a limit hit. Fresh accounts appearing and taking over the same traffic once an old one is throttled.
Quick questions
Is rate limiting the same as velocity checking?
They are close. Velocity checks measure the rate of an activity to feed a decision or alert. Rate limiting enforces a cap on it. Many teams use velocity data to set and tune their limits.
Why count tokens as well as requests?
Because cost follows tokens. A small number of requests with very long inputs or outputs can cost far more than many short ones, and a request-only limit would not notice.
What should the limit be keyed on?
Use the most durable entity you can, such as account or organization, and add device-level or cross-account views. Keying only on IP is the easiest to evade.
Will limits stop abuse by themselves?
No. They reduce exposure and slow attackers, but determined ones spread usage or rotate accounts. Limits belong alongside detection, not in place of it.
How do I avoid frustrating real customers?
Base limits on real usage, give clear error messages, offer higher limits through a verified path, and review who gets throttled so false positives are visible.
What happens when a limit is hit?
Teams usually slow, queue, or reject the extra traffic and return a clear message. Repeated hits from the same origin are often a signal worth investigating.
O que saber junto com Rate limiting

Relatório de Fraude e AML 2026
Esqueça as previsões. Este relatório detalha com o que as equipes de fraude e AML estão realmente lidando, e como responder.