Sections
ϟPULSSIX
Automation / Evergreen guide

API rate limits explained: design a queue that survives HTTP 429

Turn a request quota into a sustainable dispatch rate and avoid losing work or flooding a service with retries.

PULSSIX Desk /
2 min read (approx.)
A technician checking computer networking equipment
IT technician inspecting a network server; illustrative photograph · Bill Branson (Photographer) · Public domain (cropped/resized)
In this article
  1. A limit is an operating constraint
  2. Convert demand to calls
  3. Separate receipt from processing
  4. Follow the server’s recovery signal
  5. Watch three operational signals
  6. Test your queue under load
  7. Explore the topic

A limit is an operating constraint

An API can restrict calls over a time window or impose separate limits for a user, project or endpoint. Sending more traffic than allowed can lead to HTTP 429 or another documented rejection. A workflow that works perfectly for one record can fail when a marketing campaign triggers hundreds of events. Read the actual service quota and design for peaks before connecting production input.

Convert demand to calls

Assume a fictional service allows 120 calls per minute and each job needs three calls. The ideal upper bound is 40 jobs per minute, before retries and other consumers. Reserving 20% of the call quota leaves 96 calls per minute, or 32 jobs. A burst of 160 queued jobs needs at least five minutes at that rate if no additional work arrives. Actual completion can take longer because of latency, dependencies and the service’s window rules.

Separate receipt from processing

Record an incoming event in a durable queue and acknowledge it only according to the sender’s protocol. A worker then claims jobs at a controlled rate. Store the event ID, processing status, attempt count and next eligible attempt time. This makes backlog visible and lets work continue after a restart. Choose a maximum acceptable queue age; not every request should remain pending indefinitely.

Follow the server’s recovery signal

A 429 response may include Retry-After indicating how long to pause. It can be a number of seconds or a date. Honor the service’s documented policy and add appropriately bounded backoff with jitter where useful. Do not rotate accounts or credentials to bypass rate controls. If a request could have had a side effect before a different failure, verify the operation or use supported idempotency before replaying it.

Watch three operational signals

Track the number of queued jobs, age of the oldest job, and actual call consumption over the provider’s relevant time windows. If incoming work averages 50 jobs per minute but capacity is 32, the queue grows by about 18 each minute. A retry policy cannot solve that sustained imbalance. Reduce unnecessary requests, batch supported endpoints, obtain a suitable quota or defer non-urgent work.

Test your queue under load

Use a sandbox or simulated endpoint to return a 429, issue a cooldown, and restore normal responses. Verify that pending jobs are not lost and duplicates are not created. Test multiple workers because their combined traffic matters. The PULSSIX backlog recovery calculator helps model recovery once intake falls below processing capacity.

Primary source · MDN · HTTP 429 Too Many Requests

MDN · Retry-After header

Explore more: Automation stories · Free tools

Explore the topic

Explore the collection: Automation library