Contoso is creating a new Azure Cosmos DB for NoSQL container named carts for a multitenant shopping platform. The platform has about 3,000 tenants with broadly similar usage. Every item in the container stores tenantId, userId, cartId, and id values, and each cart belongs to exactly one user in one tenant.
Requirements:
- The largest tenant is expected to store 60 GB of cart data, and writes for that tenant must not be blocked as it grows.
- Reporting queries that filter only on
tenantIdmust not fan out to every physical partition. - The application must update all items in one cart by using a single transactional batch.
No single user ever stores more than 1 GB of data.
Which two partition key designs meet all the requirements? Each correct answer presents a complete solution. Select two.
With a hierarchical key, only the full path is a logical partition with the 20 GB and 10,000 RU/s ceilings, so a tenant-level prefix can grow across many physical partitions. Transactional batches are limited to items with the same full partition-key value, so the last level must not separate items that belong to one cart, which rules out ending in /id. Queries that filter on the tenant alone route efficiently only when tenantId is the first level. Both /tenantId, /userId (with users capped at 1 GB) and /tenantId, /userId, /cartId satisfy all three requirements.