Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — Question 27
You have an Azure Cosmos DB for NoSQL container.
All queries to the container use the Bounded Staleness consistency level.
You discover that when many queries are executed against the container, an HTTP 429 error is returned.
What are two ways to reduce the number of HTTP 429 errors? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Answer options
- A. Use a query request option to change the consistency level to Strong.
- B. Add a post-trigger to the container.
- C. Add a pre-trigger to the container.
- D. Add query retry logic to the client application.
- E. Increase the maximum throughput.
Correct answer: B, E
Explanation
Adding a post-trigger (option B) can help manage load and optimize query execution, thereby reducing HTTP 429 errors. Increasing the maximum throughput (option E) directly raises the available resources for handling more queries concurrently, which also helps in minimizing these errors. The other options either do not address the issue directly or could potentially exacerbate the problem.