Rate Limits
This guide provides details about rate limiting in Dovetail to help you anticipate and manage rate limiting
Dovetail limits the rate of REST API requests to ensure that services are reliable and responsive for all API users. Dovetail has a default limit of 200 requests per minute for a workspace. Since limits are per workspace, developers may have to manage requests across multiple tokens.
Rate limit responses
All responses from the Dovetail API will include three headers to help you manage your rate limits:
Header | Type | Description |
|---|---|---|
X-RateLimit-Limit | number | The maximum number of allowed requests in a 60 second window. |
X-RateLimit-Remaining | number | The number of remaining requests in the current 60 second window. |
X-RateLimit-Reset | timestamp | A Unix timestamp indicating when the current window ends. |
When a limit is exceeded the API will return a response with a 429 status. The 429 response is supplemented with a Retry-After response header value, which indicates how many seconds the integration must wait before reissuing the request. If you reissue the request before the retry period expires, the request will fail.
Handling
Integration should treat 429 responses as a signal to alleviate pressure on an endpoint. The best approach to accommodate rate limits is to respect the Retry-After or X-RateLimit-Reset header values and wait for this minimum amount before making another request. Alternatively, rate limits can be accommodated by exponentially increasing the delay after each successive 429 response from an endpoint.
When performing a scheduled task “a daily import”, it is best to apply some jitter to the requests to avoid the thundering herd problem. Check out the following AWS article about exponential backoff and jitter.
Testing
Do not perform rate limit testing against Dovetail's endpoints because this will place load on the servers and may impact customers. The Acceptable Use Policy identifies your obligations to avoid overwhelming Dovetail's infrastructure.
Updated 3 months ago
