-
Notifications
You must be signed in to change notification settings - Fork 3k
CosmosCLient sample with connection pooling #17165
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
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @southpolesteve, @zfoster |
@annatisch Can someone familiar with core-http answer this question? Cosmos doesn't expose any knobs on HTTP connection pools AFAIK. We just use whatever defaults core-http provides. |
Hi @prashanthmadi, @southpolesteve - sorry I somehow missed this. Let me take a look today. |
Hi @prashanthmadi - you should be able to supply your own underlying Requests session to the client in order to handle connection pooling - as is documented in this issue here: Let me know how this goes :) |
I noticed the Java and .net CosmosClient suggest using CosmosClient as a singleton to improve performance. Is the python CosmosClient threadsafe or is that what supplying a Requests session would allow (apologies I’m new to python). My situation is I’m using the python CosmosClient in azure functions. I’m creating a new CosmosClient in each request and seeing metadata fetches for every invocation which is impacting performance. |
Closing due to inactivity. Please reopen if this is still an issue. |
Is your feature request related to a problem? Please describe.
Looking for a cosmosdb sample to utilize connection pools
couldn't find any at https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/cosmos/azure-cosmos/samples
The text was updated successfully, but these errors were encountered: