CosmosClientOptions: Adds Private Custom Account Endpoints#4265
Merged
microsoft-github-policy-service[bot] merged 24 commits intomasterfrom Feb 9, 2024
Merged
Conversation
…tps://github.com/Azure/azure-cosmos-dotnet-v3 into users/kundadebdatta/4236_add_custom_domain_names
kirankumarkolli
requested changes
Jan 24, 2024
Member
kirankumarkolli
left a comment
There was a problem hiding this comment.
Conceptually, we can imagine that this.serviceEndpointEnumerator is either user given or system populated and GlobalEndpointManager.TryGetAccountPropertiesFromAllLocationsAsync should use it
FabianMeiswinkel
requested changes
Jan 24, 2024
Member
FabianMeiswinkel
left a comment
There was a problem hiding this comment.
LGTM except for the one open issue around picking the right set of endpoints to reach out to, to get account info
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs
Show resolved
Hide resolved
ealsur
approved these changes
Feb 8, 2024
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs
Show resolved
Hide resolved
kirankumarkolli
approved these changes
Feb 9, 2024
This was referenced Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
Problem Statement:
In real world, there are many reasons an endpoint could become non-responsive and stop fullfilling any incoming requests. Some examples for such reasons could be network packet drops, the server node experiencing issues or a larger outage. Today, while initializing, the .NET v3 SDK requires to fetch the account metadata information from the routing gateway, using the global account endpoint. This information is needed to figure out the read, write regions, the resource identifiers, ETag etc, which are needed by the SDK to perform Read/ Write operations. The global account endpoint is passed through the
CosmosClientconstructor (see the below example for more details).However, if for some unforeseen reason, the global account endpoint becomes non-responsive, today there is no way to fetch the account metadata information, thus failing the cosmos client initialization.
Proposed Solution:
The above problem could be solved if the global account metadata information is hosted with-in a private domain name. During an outage, the custom domain names can be used to route the Get Account metadata requests to the custom endpoints, if the primary global account endpoint become non-responsive.
Below is an example of how the SDK will capture the regional endpoints from the end user.
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #4236