Hard1 markMultiple Choice
Domain 2.4: Design a data storage solution for non-relational dataDomain 2Non-Relational DataCosmos DBPartitioning

AZ-305 · Question 27 · Domain 2.4: Design a data storage solution for non-relational data

You are designing an Azure Cosmos DB database for a multi-tenant IoT application.

The application receives telemetry from millions of devices across 5,000 different corporate customers (tenants). You need to select a partition key for the telemetry container.

Requirements:

  • Queries frequently filter by TenantId and DeviceId.
  • Data must be evenly distributed across logical partitions to avoid hot partitions.
  • Some large tenants generate more than 20 GB of telemetry data per month.

Which partition key strategy should you recommend?

Answer options:

A.

A synthetic partition key combining TenantId and DeviceId (e.g., TenantId_DeviceId).

B.

TenantId

C.

DeviceId

D.

Date/Timestamp

How to approach this question

Identify the Cosmos DB limit: a logical partition cannot exceed 20 GB. Since a single TenantId exceeds this, TenantId alone is invalid. A synthetic key solves this.

Full Answer

A.A synthetic partition key combining TenantId and DeviceId (e.g., TenantId_DeviceId).✓ Correct
In Azure Cosmos DB, a logical partition has a hard limit of 20 GB. Because the scenario states that some tenants generate more than 20 GB of data, using `TenantId` as the partition key will result in a partition size violation. To solve this, you should create a synthetic partition key that concatenates `TenantId` and `DeviceId`. This provides high cardinality, ensures data is evenly distributed, avoids the 20 GB limit, and still allows efficient querying when both IDs are known.

Common mistakes

Choosing TenantId, ignoring the 20 GB logical partition limit constraint mentioned in the scenario.

Practice the full Azure Solutions Architect Expert AZ-305 Practice Exam 1

55 questions · hints · full answers · grading

More questions from this exam