Thanks for the response.
In your response you mention 408 error code is also retried, but in MSFT docs it's mentioned that 408 error code is not retried as these operations are idempotent].
You're absolutely correct, 408 is not retried for write operations. This is because writes are not always idempotent and retrying them could lead to duplicates.
The SDK retries within the current region first. If persistent failures occur (like the region being unhealthy), the SDK then fails over and retries in another write region, if configured. So, the cross-region retry behavior is conditional on the health of the current region and is an automatic part of the SDK’s design for multi-write setups.
Azure Cosmos DB SDKs in multiregional environments.
Do we know how many retries are attempted in same region before going cross region and any way to configure this count ?
The default max retry count for throttled requests is 9 retries with exponential backoff.
The SDK also uses a partition-level circuit breaker. By default, if a partition experiences 5 consecutive failures, the SDK marks it as unavailable and begins retrying in another region.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.