Remediating Hot Partitions in Azure Cosmos DB for NoSQL
Short answer
A Redesign the partition key to one with high cardinality and even access (for example, a synthetic/composite key) and migrate data
Question
Key Takeaways
Hot partitions in Azure Cosmos DB for NoSQL occur when a skewed partition key causes uneven load distribution. Option A is correct because redistributing data via a high-cardinality composite key resolves the bottleneck, whereas increasing RU/s or changing consistency fails to address the underlying skew.
Expert Analysis
A hot partition indicates a low-cardinality or skewed partition key; the durable fix is to choose a higher-cardinality/composite key that distributes load evenly and migrate the data. Simply raising RU/s pays for skew without fixing it, changing consistency does not rebalance partitions, and the analytical store addresses analytics, not the hot-partition throughput problem.
The scenario presents a classic Azure Cosmos DB for NoSQL architectural anti-pattern known as a "hot partition." The symptom is clear: one physical partition is absorbing the majority of Request Units (RU/s) while others remain idle, leading to frequent HTTP 429 (Too Many Requests) throttling errors. The constraint that point reads by 'id' are fine but throughput cannot be raised cost-effectively provides the critical boundary condition for the solution. In Cosmos DB, data is distributed across physical partitions based on the hash of the partition key value. When a specific partition key value receives significantly more traffic than others, it becomes a bottleneck because the provisioned capacity for that single logical partition is capped, even if the overall container has spare capacity elsewhere. This is a fundamental limitation of the sharding architecture; you cannot simply "add more servers" to a single partition that has hit its internal throughput ceiling.
Option A is the correct remediation because it addresses the root cause: the uneven distribution of data caused by a low-cardinality or skewed partition key. By redesigning the partition key to include high-cardinality elements (such as a composite key combining multiple attributes or a synthetic unique identifier), the write and read load can be spread evenly across many physical partitions. Although this requires a data migration effort, it is the only durable fix that resolves the underlying structural imbalance. Once the data is redistributed, the 429 errors will cease because no single partition will be overwhelmed, and the cluster's total RU/s capacity can be utilized effectively.
Option B, switching to eventual consistency, is incorrect because consistency models in Cosmos DB govern how strongly replicas agree on data visibility, not how data is distributed or how throughput is allocated. Changing from strong to eventual consistency might slightly improve latency for some reads, but it does nothing to change the physical location of the data or the partition key hashing logic. The hot partition will continue to consume all available RU/s for writes and reads targeting that key, resulting in the same 429 errors.
Option C, increasing provisioned RU/s, is explicitly ruled out by the question's constraint that throughput "cannot be raised cost-effectively." Even if we ignored the cost constraint, this approach is fundamentally flawed for hot partitions. Increasing the global provisioned throughput increases the capacity for the entire container, but the hot partition will still hit its individual throughput limit much faster than the other partitions. You would end up paying for significant excess capacity on the idle partitions just to serve the needs of the single overloaded one, which is economically inefficient and technically unsustainable as the hot key continues to grow.
Option D, enabling the analytical store, is irrelevant to the operational throughput problem. The analytical store creates a separate columnar storage instance for real-time analytics queries (KQL). It does not affect the transactional document store where the 429 errors are occurring. The hot partition issue is related to the transactional workload's access pattern, not the availability of analytical insights.
Official Reference
https://learn.microsoft.com/en-us/azure/cosmos-db/partition-data
This link opens the official vendor documentation in a new tab.
Exam Strategy
When analyzing Cosmos DB performance issues involving 429 throttling, always investigate the partition key design first. If one partition is saturated while others are idle, the issue is almost certainly a hot partition caused by low-key cardinality. Remember that increasing provisioned throughput is a temporary band-aid that does not solve the sharding imbalance, and consistency settings do not influence data distribution. Prioritize schema redesign for long-term stability.
Related Analysis
Practice All AI-200 Questions
Access 69 questions with complete answers and detailed explanations.
View Full AI-200 Practice Test →