Bitzu

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

Single choice

Roughly how many request units does a point read of a 1 KB item (by ID and partition key) consume in Azure Cosmos DB?

  1. About 0.1 RU
  2. About 1 RU
  3. About 5 RU
  4. 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.

Select all that apply

Which statements about the serverless capacity mode of Azure Cosmos DB are true?

  1. You are billed for the request units your operations consume
  2. A serverless account can run in one Azure region only
  3. It suits intermittent traffic with a low average-to-peak ratio
  4. It can be replicated to an unlimited number of regions
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More AZ-305 topics in this module