Closed pratyush-prateek closed 1 year ago
@jcocchi / @kirankumarkolli This sounds like a good documentation article to tackle, might be worth brainstorming and see what we can come up with.
@jackbond
@pratyush-prateek Does this help? https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/best-practice-dotnet#best-practices-for-multi-tenant-applications
@ealsur Yes, these look good. We can implement some or more of these surely. Thanks !
Background
I am currently working on a project which is a multi-tenant PaaS service based on micro-services architecture. The database layer logic requires writing to multiple different cosmos DB accounts. Think it as a multi-tenant setting where each tenant has a separate cosmos DB account. For that, we need to maintain multiple cosmos clients in memory so that the same can be used to perform the database operation when request comes from different tenants. Also, the compute is shared for all the tenants.
Enquiry
I wanted to know if maintaining multiple cosmos clients in memory could cause an issue here or not, given the maximum number of cosmos DB connections could go up-to 100. Issues being, memory overflow, port exhaustion etc. If yes, what could be a good practice here.