Understanding Azure Cosmos DB Free Tier
Asked Answered
E

1

9

Azure Cosmos DB free tier give us 1000 RU/s and 25 GB of storage.

I created a database with one container, added some data to it and executed some queries. Looking at the insights, I can see this: Insights

Does that mean I used 99.68 RUs out of the 1000 RUs from the free tier? Are those 1000 RUs in a month?

Emlen answered 23/1, 2022 at 18:30 Comment(0)
U
8

Does that mean I used 99.68 RUs out of the 1000 RUs from the free tier?

It means that you used 99.68 request units in total. It is unclear over what time period you used these but even if that was all in one second this is well within the 1,000 RU/S limit.

Are those 1000 RUs in a month?

No. When you remember that RU/s is "Request Units per Second" this doesn't make sense. It is an ongoing allowance and based on RU provisioned (whether manually or via auto scale) not RU used.

I imagine that you may be concerned that you have already used 10% of your free allowance? This is absolutely not the case. For a container provisioned at 1,000 RU/s you can use 1,000 RU for each second and the allowance starts fresh each second. Any historic request units used have no importance here.

In terms of actual request units the free account means that potentially you could use 2,592,000,000 per month without paying any extra if you were somehow able to keep the collection constantly processing operations worth 1,000 request units every second in that month.

If you exceed the limits for the free tier by provisioning more than 1,000 RU/s you will be billed accordingly at hour granularity.

With the free account if you want to be certain to avoid additional charges you should currently steer clear of autoscale. The minimum autoscale range that can be configured is now 100-1,000 RU/s (was previously 400-4,000) - but autoscaled RUs are charged at a 50% premium so 1,000 autoscaled RU/s is billed as 1,500.

With the free account you can provision without charge up to 1,000 RU/s via fixed provisioning across all containers and databases in the account - with fixed provisioning you are charged based on what you provisioned rather than what you used (the system will throttle you if your usage would exceed provisioned limit).

Udele answered 23/1, 2022 at 19:18 Comment(3)
Thank you very much Martin, now I got it. 1000 RU/s is definitely enough for what I needEmlen
Using fixed provisioning how can I set up more than 2 containers inside free tier? The Portal says that any container has to be set up with minimum 400 RU/s. For example, is it possible to set up 1 database with 6 containers without any additional cost?Wolff
@Wolff - use database provisioned throughput instead of provisioning it at collection level. Then up to 25 collections can share the throughput allocated to each database. So you could in theory have two databases at 500 RU each with 25 collections and still be within the free tier for 50 collections.Udele

© 2022 - 2024 — McMap. All rights reserved.