0
votes

We have CosmosDB instance with multiple collections: 10 of them created with dedicated throughput (400 RU/sec) and remaining 2 are created in a database with a shared 400 RU/sec throughput.

In the CosmosDB Collections Browse there is a Table which gives an overview on estimated hourly cost per collection and from there it seems like there is NO difference cost-wise (same estimated hourly cost is reported for collections created with dedicated throughput as well as for collections which should share throughput).

Can somebody confirm if a database created with shared throughput generates single cost regardless of the number of collections created within that particular database?

1

1 Answers

0
votes

The best means for estimating the cost for a Cosmos DB account is to physically measure throughout and not attempt to calculate. Shared throughout is going to create an _Empty collection line item on your bill for which all shared throughput collections will be itemized under. It isn't that clear and costs can escalate but for the most part, a dedicated throughput and a shared throughput will be billed the same. What will not be billed the same are the consistency levels, indexing policies, stored procedures, etc., differences that are billed in addition to the specific RU setting.

An internal employee wrote a pretty cool tool but do consider it 3rd Party. It is not officially supported by Microsoft: How to correctly calculate the Request Units in Azure Cosmos DB

There are multiple factors that are being calculated and the below console application is fairly accurate at detailing this information. I suggested running this on your solution and comparing this with the overview data that you are sourcing:

AzureCosmosDB-RequestUnitsTester

It will also help you determine what RU/s are needed for the various operations your solution requires. Please ask any additional questions you may have. The goal is to not experience any surprises.