Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CosmosDbClientBuilder should support warm up (like CreateAndInitializeContainersAsync()) #3042

Closed
ravarnamsft opened this issue Feb 19, 2022 · 0 comments · Fixed by #3257
Closed
Assignees
Labels
feature-request New feature or request
Milestone

Comments

@ravarnamsft
Copy link

Is your feature request related to a problem? Please describe.
There are many examples that recommend creating a CosmosClient instance using the Builder pattern (it is also easier to read and understand). However, the solution to the cold start problem mentioned here #1706 isn't ported over to this pattern.

Describe the solution you'd like
The Builder has a new method (or an overload) that takes in the containers to be initialized. My personal recommendation is to also provide an option to pre-load everything in the account rather than having to list every database and container.

Describe alternatives you've considered
We recently came across an issue where the initial latencies for calls jumped to 40 seconds or more. My current alternative is to get rid of the builder pattern and create the clientOptions directly and use the CreateAndInitializeAsync method. However, I feel that's a letdown and the solution should be ported over to the Builder class.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants