Creating databases with shared throughput is not reliable
See original GitHub issueI create 4 databases (under the same Cosmos DB account) back to back programmatically using your .NET SDK for Cosmos v3. It seems there is some kind of bug with shared throughput per database.
const int throughput = 800;
await cosmosClient.CreateDatabaseIfNotExistsAsync(databaseId, throughput);
The SDK sometimes creates the first database with 800 shared throughput, but it will ignore this request for subsequent databases. So the other 3 databases will be created with dedicated throughput per container. Now, what’s strange is sometimes the SDK works as expected and creates 4 databases with 800 shared throughput each. I just got slammed with an unexpected bill because of this. I was also able to reproduce this several times.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Introduction to provisioned throughput in Azure Cosmos DB
You can configure shared and dedicated throughput only when creating the database and container. Setting the throughput at the container-level.
Read more >azure - Deployment of CosmosDB with shared autoscaling ...
If you are creating a new database or container resource you need to pass the throughput in the options for the resource.
Read more >How can I create a database with provisioned throughput?
I don't see a way to create a database with shared throughput in the new SDK. public virtual Task CreateDatabaseIfNotExistsAsync(string id, ...
Read more >Things You Need to Know Before Building Apps With ...
Azure Cosmos DB is a scalable no-SQL database. ... Create a database with shared throughput and share it across all collections in that ......
Read more >Better understanding database throughput and partitioning in ...
We talk about how Azure Cosmos DB determines how many physical ... and also share best practices for scaling throughput, and how to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you perhaps exceeding the max 25 containers with shared database throughput limit? (IIRC you can still add containers at that point, but only with RUs allocated at the Container level - perhaps your code is specifying the limits at Database and Container level?)
Closing due to in-activity, pease feel free to re-open.