Support preferred locations for Cosmos DB connections #2290
Labels
Cosmos
The azure_cosmos crate
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Feature Summary
Include an option for CosmosClient where you can provide a list of preferred locations, similar to the Cosmos DB Python SDK
Feature Description
At the moment there's no way of indicating which region you want a database request to go to, you just provide the global URL when you create the
CosmosClient
instance. In cases where you are using multiple regions for redundancy this might not matter because you only need to use a satellite region if the primary one is unavailable. In cases where you have multiple regions to reduce latency it's key that you can direct requests to a specific region.The Cosmos DB Python SDK has a feature that does this documented here and I expect the Rust equivalent would work in a similar way.
Use Case
No response
Alternatives
An alternative approach is to use the region-specific URL but this doesn't work for satellite regions, see separate bug report.
Additional Context
No response
The text was updated successfully, but these errors were encountered: