Rate limits
Pace background jobs and recover from a request-rate limit.
Budget request capacity
Each key has a per-minute request limit. Every response reports it in X-RateLimit-Limit and the requests left in the current minute in X-RateLimit-Remaining. A credit balance measures the cost of the operations your key uses. A history import can reach the per-minute limit while the key still has credits left.
Give interactive requests some capacity of their own. A scoreboard that polls once for many viewers creates less upstream work than having each browser poll the data service independently.
Handle a 429 response
Pause the affected queue. The response includes a Retry-After header with the number of seconds until the next minute begins. Wait at least that long before trying again, add a little random variation, and cap the number of attempts. HTTP 429 specification
Resume gradually
Release queued work in small batches. A simultaneous restart can immediately exhaust the next window. In an event view, keep the last successful result visible and show when it was received. Request logs · Credits