Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 18789

How can I maintain an async CosmosDB connection pool in a FastAPI app?

$
0
0

I have a FastAPI app that uses the azure-cosmos library to store data in a CosmosDB. I'm expecting to have a ton of traffic, so I want to create a pool of async CosmosDB clients.

Is that something the azure-cosmos library supports? I can't seem to find any examples of using a connection pool for Cosmos DB. Does it even make sense to have a pool of async CosmosDB clients? Or can one connection handle massive amounts of traffic?

If azure-cosmos has no direct support for connection pools, but it makes sense to have a pool, is there a generic library that can assist with maintaining a pool of connections?


Viewing all articles
Browse latest Browse all 18789

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>