Identify the throttling limits that apply for each Microsoft Graph resource.If SDKs retry throttled requests automatically when they are not batched, throttled requests that were part of a batch are not retried automatically. You may retry all the failed requests in a new batch after the longest retry-after value. You should retry each failed request from the batch using the value provided in the retry-after response header from the JSON content. It is possible for multiple requests to be throttled in a single batch. The batch itself fails with a status code of 424 (Failed Dependency). Requests in a batch are evaluated individually against throttling limits and if any request exceeds the limits, it fails with a status of 429 and an error similar to the preceding sample response. JSON batching allows you to optimize your application by combining multiple requests into a single JSON object. Continue to use the recommended Retry-After delay and retry the request until it succeeds.Īll the resources and APIs described in the Service-specific limits provide a Retry-After header except when noted.įor a broader discussion of throttling in the Microsoft Cloud, see Throttling pattern.īest practices for discovering files and detecting changes at scale describes best practices in details. If the request fails again with a 429 error code, you are still being throttled.Wait the number of seconds specified in the Retry-After header.Backing off requests using the Retry-After delay is the fastest way to recover from throttling because Microsoft Graph continues to log resource usage while a client is being throttled. The failed response includes the Retry-After response header. When you implement error handling, use the HTTP error code 429 to detect throttling. Avoid immediate retries, because all requests accrue against your usage limits.Reduce the number of operations per request.The following are best practices for handling throttling: Whenever the throttling threshold is exceeded, Microsoft Graph responds with a response similar to this one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |