AZ-305 ยท Semi-structured and unstructured data design
Cosmos DB APIs and capacity modes
Azure Cosmos DB for NoSQL, MongoDB, Apache Cassandra, Apache Gremlin, Table; provisioned vs autoscale vs serverless throughput, request units.
Key points
- Azure Cosmos DB APIs: NoSQL (native JSON), MongoDB, Apache Cassandra, Apache Gremlin (graph), Table; pick the one matching your drivers.
- Request units (RUs): a point read of a ~1 KB item costs about 1 RU.
- Standard provisioned RU/s: steady traffic.
- Autoscale: between 10% of maximum and maximum, bills the highest RU/s each hour.
- Serverless: bills consumed RUs, single region only.
Source: https://learn.microsoft.com/en-us/azure/cosmos-db/request-units
Practice questions
Roughly how many request units does a point read of a 1 KB item (by ID and partition key) consume in Azure Cosmos DB?
- About 0.1 RU
- About 1 RU
- About 5 RU
- About 10 RU
Show answer
Answer: B. About 1 RU
A point read of an item of about 1 KB is the baseline of the RU currency and costs about 1 RU, whichever API you use. Queries and writes cost more than a point read, so values such as 5 or 10 RU describe heavier operations, not the baseline.
Which statements about the serverless capacity mode of Azure Cosmos DB are true?
- You are billed for the request units your operations consume
- A serverless account can run in one Azure region only
- It suits intermittent traffic with a low average-to-peak ratio
- It can be replicated to an unlimited number of regions
- You pay per hour for RU/s whether or not you use them
Show answer
Answer: A. You are billed for the request units your operations consume, B. A serverless account can run in one Azure region only, C. It suits intermittent traffic with a low average-to-peak ratio
Serverless bills only the RUs your operations consume and fits intermittent traffic with a low average-to-peak ratio, but a serverless account runs in a single Azure region. Multi-region distribution and per-hour billing of provisioned RU/s belong to provisioned throughput.
A container that uses autoscale throughput scales down to 0 RU/s when idle, so idle hours cost nothing for throughput.
Show answer
Answer: False
False. Autoscale scales between 10% of the configured maximum (Tmax) and Tmax, so an idle container is still billed for at least 0.1 x Tmax each hour. Only serverless bills purely for consumed RUs.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
