AZ-204 Develop for Azure storage Practice Question
A Cosmos DB container for session records receives hot-partition throttling because the partition key has only five possible values. What should the developer change? The design must avoid adding custom operational scripts.
⚠ Common exam trap
Many exam-takers confuse throughput scaling mechanisms (TTL, analytical store, stored procedures) with partition key design, which is the only way to resolve hot-partition throttling without custom scripts.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Choose a partition key with higher cardinality and even request distribution
Hot-partition throttling occurs when a partition key has low cardinality (few distinct values), causing uneven request distribution and exceeding the physical partition's throughput limits. Choosing a partition key with higher cardinality and even request distribution spreads operations across more physical partitions, eliminating throttling without custom scripts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the default TTL
Why it's wrong here
Increasing the default Time-to-Live (TTL) for items in a Cosmos DB container controls how long data persists before automatic deletion, thereby managing storage consumption. However, TTL has no bearing on how requests are distributed across logical or physical partitions, nor does it influence the throughput (RU/s) allocated to them. A hot partition is a throughput issue caused by uneven request distribution, which TTL cannot resolve.
- ✗
Enable analytical store only
Why it's wrong here
Enabling the analytical store in Azure Cosmos DB provides a separate, columnar store optimized for large-scale analytical queries without impacting the transactional store's performance. While beneficial for analytics, it operates independently of the transactional store's partitioning strategy. Therefore, enabling or using the analytical store does not address or correct hot partitions occurring within the transactional store, which are caused by imbalanced operational workloads.
- ✓
Choose a partition key with higher cardinality and even request distribution
Why this is correct
A hot partition arises when a single logical partition key value receives an excessive volume of requests, exhausting its allocated throughput and causing throttling. Choosing a partition key with higher cardinality ensures a greater number of distinct logical partitions, while ensuring even request distribution across these keys prevents any single partition from becoming a bottleneck. This strategy effectively spreads both data storage and request throughput across multiple physical partitions, resolving the hot partition issue and improving scalability.
- ✗
Use a stored procedure for every write
Why it's wrong here
Stored procedures in Azure Cosmos DB execute server-side transactional logic within the scope of a single logical partition, optimizing operations by reducing network round trips and ensuring atomicity. However, they do not alter the fundamental partitioning strategy or how requests are distributed across different logical partitions. If the underlying partition key itself is causing a hot spot due to an uneven distribution of requests, using a stored procedure will not alleviate the problem; the hot partition will persist.
Go deeper
Related to this question
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.