You must migrate 200 million JSON documents into an existing Azure Cosmos DB SQL API container and perform upserts if documents already exist. The goal is to maximize throughput, handle throttling automatically, and minimize code changes in a .NET service. Which two actions should you take?
Choose an answer
Tap an option to check your answer.
Correct answer: Use the Azure Cosmos DB .NET SDK (v3/v4) with AllowBulkExecution enabled and dispatch parallel CreateItemAsync/UpsertItemAsync calls., Use the Azure Cosmos DB Bulk Executor library for .NET or Java to perform high-throughput bulk import and update operations..
Why this is the answer
The two correct options leverage bulk operations for high throughput. The Azure Cosmos DB .NET SDK (v3/v4) with AllowBulkExecution enabled allows the SDK to internally batch operations and optimize network calls, effectively performing bulk operations with minimal code changes and automatic throttling handling. This is a modern and recommended approach. The Azure Cosmos DB Bulk Executor library is specifically designed for high-throughput bulk import and update operations, providing excellent performance and automatic throttling management. Incorrect options: Inserting documents sequentially on a single thread is inefficient and will not maximize throughput. While exponential backoff helps with 429 errors, the sequential nature is a bottleneck. Using stored procedures for individual document writes adds overhead and does not provide bulk capabilities, leading to lower throughput. Stored procedures are executed server-side but still require individual calls for each document in this scenario. A single Azure Functions instance with a queue trigger serializes writes, which is the opposite of maximizing throughput. While it can handle individual messages, it won't achieve the required performance for 200 million documents efficiently.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed