Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Cosmos add a GlobalEndpointManager #118

Open
glademiller opened this issue Apr 4, 2019 · 1 comment
Open

Cosmos add a GlobalEndpointManager #118

glademiller opened this issue Apr 4, 2019 · 1 comment
Assignees
Labels
CosmosDB CosmosDB related issue enhancement

Comments

@glademiller
Copy link

In the JS SDK and I presume and other official Cosmos SDK implementations a cache of available regions is used to pick a URL to write to based on a list of preferred regions provided to the client. Without this I can easily set a region URL manually but without something like the endpoint manager the region might not be available when I make my next request.

From what I can ascertain the JS SDK refreshes the endpoint list every 5 minutes by default.

The region URLs are stored in the Database Account resource which doesn't appear to be exposed at this moment in this SDK.

@MindFlavor
Copy link
Owner

After the aforementioned issue we will have the necessary info to implement a global endpoint manager.
I do not like the "automagic" refresh behind the scenes, it might work for JS/C# but in Rust I prefer to have more control. I probably will only allow to move between endpoints at user request. This means that the endpoint refresh and selection will be up to the caller (the latter being the case in JS/C# anyway).

@MindFlavor MindFlavor added the CosmosDB CosmosDB related issue label Jun 2, 2020
@MindFlavor MindFlavor self-assigned this Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CosmosDB CosmosDB related issue enhancement
Projects
None yet
Development

No branches or pull requests

2 participants