Cosmos Db JAVA SDK Retry Policy
Hi Azure Cosmos Db Team,
We haven’t explicitly set retry policy in the event of throttling. Uses the default throttling retry policy.
Below as seen from diagnostics.
throttlingRetryOptions=RetryOptions{maxRetryAttemptsOnThrottledRequests=9, maxRetryWaitTime=PT30S}
However when we encountered actual throttling (“statusCode”:429,”subStatusCode”:3200) we see in the diagnostics values increasing in multiples of 4 “retryAfterInMs”:4.0 x-ms-retry-after-ms=4, “retryAfterInMs”:8.0 x-ms-retry-after-ms=8 and resulting in Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later.
Can you please let me know the difference in behavior here(maxRetryWaitTime as shown in throttlingRetryOptions and retryAfterInMs in the diagnostics as seen above in the event pf throttling) ? I was expecting in the event of throttling the request will be retried after 30 seconds only based on throttlingRetryOptions setting? This is having a compounding effect in case of concurrent requests which affects overall throughput. We need to customize based on our requirement the retry no of times and interval in the event of throttling. Which parameter should we use for that?
With Regards,
Nitin Rahim
Hi Azure Cosmos Db Team, We haven’t explicitly set retry policy in the event of throttling. Uses the default throttling retry policy.Below as seen from diagnostics. throttlingRetryOptions=RetryOptions{maxRetryAttemptsOnThrottledRequests=9, maxRetryWaitTime=PT30S} However when we encountered actual throttling (“statusCode”:429,”subStatusCode”:3200) we see in the diagnostics values increasing in multiples of 4 “retryAfterInMs”:4.0 x-ms-retry-after-ms=4, “retryAfterInMs”:8.0 x-ms-retry-after-ms=8 and resulting in Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later. Can you please let me know the difference in behavior here(maxRetryWaitTime as shown in throttlingRetryOptions and retryAfterInMs in the diagnostics as seen above in the event pf throttling) ? I was expecting in the event of throttling the request will be retried after 30 seconds only based on throttlingRetryOptions setting? This is having a compounding effect in case of concurrent requests which affects overall throughput. We need to customize based on our requirement the retry no of times and interval in the event of throttling. Which parameter should we use for that? With Regards,Nitin Rahim Read More