Do less work first
Before tuning concurrency, check you are not making requests you did not need:Bulk endpoints instead of loops
Bulk endpoints instead of loops
bulk_edit applies one change across many links in a single request. A thousand sequential update_shortlink calls is a thousand requests against a budget that a handful of bulk calls would barely touch.Batch your dashboard metrics
Batch your dashboard metrics
get_org_metrics_batch takes several dimensions at once. Four widgets, one request.Raise per_page
Raise per_page
per_page=100 walks 10,000 records in 100 requests. The default of 10 makes it 1,000.Cache what cannot change
Cache what cannot change
Yesterday’s analytics are final. Domain lists and UTM templates change rarely. Neither needs re-fetching on every page load.
Spend the budget deliberately
The budget belongs to your organization and every key draws on the same one, so a key is a credential and a permission scope — not a throughput allocation. A nightly export running flat out will starve the requests serving your product’s UI, and moving it to its own key does not change that. Decide what the interactive path needs, then keep batch work inside what is left: run exports off-peak, cap their concurrency, and have them back off first when the two compete. Give each integration its own key regardless, scoped to what it needs. That is what lets you revoke one without an outage everywhere else, and tell from the access pattern which system is spending the budget.Pace against the headers
Every response tells you where you stand. Use it rather than sleeping a fixed amount:Concurrency that adapts
Fixed parallelism is either too slow or too fast. A semaphore that shrinks on a429 finds the right level on its own:
Shape the load over time
1
Queue rather than fan out
A webhook that creates a link should enqueue the work. Traffic spikes then become queue depth instead of a wall of simultaneous requests.
2
Stagger scheduled jobs
Three jobs all starting at midnight contend for the same window. Offset them.
3
Jitter your retries
Everything that failed together retrying at exactly the same moment fails together again. Add randomness.
4
Run big syncs off-peak
A full reconciliation at 3am competes with nothing.
Watch the right signal
Alert onX-RateLimit-Remaining trending toward zero, not on 429 counts. By the time you are counting rejections, users are already waiting. Log the header on a sample of responses and chart it — a slow decline over a week is a capacity conversation, a sudden cliff is a runaway loop.
Rate limits meter request volume. A
FEATURE_LIMIT_EXCEEDED is a different thing entirely: your plan’s allowance for a resource is exhausted, and no amount of waiting or pacing clears it.