The idea, explained
A service has finite capacity: processor time, memory, database connections and network bandwidth. If incoming work exceeds that capacity, queues grow, latency rises and failures can spread. A server can protect itself by rejecting excess work quickly instead of starting work it cannot finish.
For HTTP APIs, status code 429 means Too Many Requests. The server may send Retry-After, which tells the client how long to wait. The standard does not require one universal counting rule: limits may apply per account, credential, endpoint or group of servers. Clients therefore need to read the API’s policy instead of assuming every 429 means the same thing.
A rate limit controls request frequency. A quota can represent requests, bytes, processor time or another scarce resource. This distinction matters because ten cheap lookups may cost less than one large analysis. Google’s reliability guidance warns that requests per second can be a poor capacity measure when requests have very different costs.
A well-behaved client applies backpressure. It pauses or reduces concurrency, respects Retry-After, and uses exponential backoff when no explicit delay is supplied. Exponential backoff increases the wait after repeated failures. Jitter means adding small randomness to the delay so thousands of clients do not retry simultaneously. Nonessential work can be delayed or dropped, while critical interactive work may receive reserved capacity.
Follow a worked example.
Suppose a delivery API permits 60 requests per minute per account and allows a short burst of 10. A dispatcher has 120 address updates ready at 9:00.
Step 1: send at most 10 immediately, using the burst allowance. That leaves 110 updates.
Step 2: pace the rest at one request per second, because 60 per minute equals 1 per second. After 50 more seconds, 60 total requests have been sent in the first minute. The remaining queue is 60.
Step 3: imagine request 41 receives 429 with Retry-After: 15. The client stops new calls for 15 seconds rather than retrying instantly. It keeps the unsent updates in its local queue.
Step 4: after the wait, it resumes conservatively at one request per second. If several workers share the same account limit, they must coordinate a shared budget; four workers each sending 60 per minute would produce 240 requests per minute and keep triggering rejections.
The result is slower completion, but the client avoids a retry storm, preserves order and gives the API time to recover.
Where people get stuck
Common misconception: a 429 response means the server is down. It usually means the client has exceeded a policy or the service is shedding load; other clients may still succeed. Another mistake is retrying every rejected request immediately. That adds more traffic precisely when the service is constrained. Also avoid treating a published requests-per-second number as a promise of equal-cost work: expensive endpoints may have separate limits, and a provider may count usage across regions or credentials.
Now try it yourself.
1. Check the core idea
Practice: An API allows 100 requests per minute. Your client sends 100 requests in the first 20 seconds and receives 429 with Retry-After: 30. When should it send the next request, and what should it do with 50 queued nonurgent requests?
Reveal the answer & reasoning
It should wait at least 30 seconds because Retry-After is the server’s explicit backpressure signal. After that, it should resume at a controlled pace rather than release all 50 at once. A simple rate is 100 divided by 60, about 1.67 requests per second, but the client should choose a slightly lower starting rate if recent calls were rejected. It should keep the 50 nonurgent requests queued, reduce concurrent workers, and add jitter if multiple workers will resume. This answer does not assume the minute window resets at the retry time; the provider’s documented counting policy still governs.
Why this was added
The library covers APIs, retries and reliability but not the distinct roles of rate limits, resource quotas and client-side backpressure.