Rate limits
Design OmniLab clients to handle throttling safely, even when exact quotas are provisioned per environment.
1 min read
Exact API quotas are confirmed during provisioning, so this article focuses on the client behavior you should implement before go-live.
What to expect
- Burst traffic, bulk syncs, and tight polling loops are the most common causes of throttling.
- Read-heavy endpoints such as booking lookups can still be throttled if you call them per page view instead of batching or caching.
- Webhooks are often a better fit than repeated polling when another system needs timely updates.
Recommended client behavior
- Reuse access tokens until they expire instead of requesting a new token for every API call.
- Page through large result sets instead of refetching everything repeatedly.
- Cache read results where short-lived staleness is acceptable.
- Queue retries with jitter instead of retrying immediately.
- Respect
429 Too Many Requestsand anyRetry-Aftervalue if OmniLab sends one. - Retry only idempotent reads automatically. Gate writes and cancellations carefully.
A safe retry model
- If a request returns
429, back off immediately. - If
Retry-Afteris present, wait at least that long. - Otherwise use exponential backoff with jitter.
- Cap concurrent workers so one spike does not create a retry storm.
- Surface a useful operator alert if throttling becomes sustained.
if response.status == 429:
wait = retry_after_header or exponential_backoff_with_jitter
retry_later()Design patterns that reduce throttling
| Use case | Better pattern |
|---|---|
| Show upcoming bookings in a portal | Cache booking results for a short session window and refresh on demand |
| Keep a CRM updated | Use webhooks instead of polling |
| Backfill historical data | Run scheduled batches and paginate through results |
| Cancel a booking | Fetch once, then cancel only after participant action |