Skip to main content
Skip to content

Rate limits

Two stages — one by network origin, one by key — the headers they set, and how to back off.

Every /api/v1 request passes two limiters in order. The first counts by network origin and runs before authentication, so an unauthenticated flood is stopped without a database lookup. The second counts by key, per endpoint, and runs after the key has been verified.

StageCounted againstLimitWindow
NetworkThe calling origin, before authentication600 requests60 seconds
Per key — /authYour key300 requests60 seconds
Per key — workspace readYour key300 requests60 seconds
Per key — file listingYour key300 requests60 seconds

Headers

HeaderWhenMeaning
RateLimit-LimitWhenever the limiter is enforcingThe ceiling for the window.
RateLimit-RemainingWhenever the limiter is enforcingWhat is left in this window.
Retry-AfterOn a 429Seconds to wait. At least 1.

Backing off

  • Honour Retry-After when it is present. It is computed from the window, not guessed.
  • Otherwise back off exponentially with jitter. A fixed interval across several clients reconverges into the same spike that caused the limit.
  • Do not retry inside a request somebody is waiting on. Queue it.
  • If you are polling, poll less. Six hundred reads a minute is a great deal of polling for data that changes hourly.