AZ-305 Practice Question 54: Cosmos Order Hot Partition
Microsoft Azure Solutions Architect Expert (AZ-305) · Test 6 · question 4 of 10
An online store keeps orders in an Azure Cosmos DB for NoSQL container partitioned by /status, which holds values such as pending, paid, shipped and returned. Most new writes carry the pending status, and the application's main queries retrieve the order history of a single customer. Users see HTTP 429 responses during sales even though the provisioned throughput is well above the average load.
Which change resolves the problem in the design?
Show answer and explanation
Answer:
A good partition key has high cardinality, spreads request unit consumption and storage evenly across logical partitions, and appears in the filters of the common queries. /customerId has many values, so new orders spread across partitions, and the main query (order history of one customer) is served from a single partition. With /status, nearly all new writes land in the pending partition, which becomes a hot partition, and throttling occurs while the total is under-used.
Option A treats the symptom. Throughput is divided among physical partitions, so the hot partition still hits its share of the limit while the extra capacity is wasted, and the cost rises.
Option B creates another hot spot, because all current orders land on today's partition while older partitions stay idle.
Option D is the worst case. Every document lands in one logical partition, which caps storage and throughput at the limits of a single partition.
Reference: Partitioning and horizontal scaling in Azure Cosmos DB