Skip to content

Commit 5bffeb2

Browse files
committed
MSDocs: Add bulk scenario to slow responses
1 parent eb0efc3 commit 5bffeb2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

articles/cosmos-db/sql/troubleshoot-dot-net-sdk-slow-request.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to diagnose and fix slow requests when using Azure Cosmos
44
author: j82w
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
7-
ms.date: 02/17/2022
7+
ms.date: 03/09/2022
88
ms.author: jawilley
99
ms.topic: troubleshooting
1010
ms.reviewer: sngun
@@ -33,6 +33,15 @@ Consider the following when developing your application:
3333

3434
Do not verify a Database and/or Container exists by calling `Create...IfNotExistsAsync` and/or `Read...Async` in the hot path and/or before doing an item operation. The validation should only be done on application startup when it is necessary, if you expect them to be deleted (otherwise it's not needed). These metadata operations will generate extra end-to-end latency, have no SLA, and their own separate [limitations](https://aka.ms/CosmosDB/sql/errors/metadata-429) that do not scale like data operations.
3535

36+
## Slow requests on bulk mode
37+
38+
[Bulk mode](tutorial-sql-api-dotnet-bulk-import.md) is a throughput optimized mode meant for high data volume operations, it is not a latency optimized mode, it is meant to saturate available throughput. If you are experiencing slow requests when using bulk mode make sure that:
39+
40+
* Your application is compiled in Release configuration.
41+
* You are not measuring latency while debugging the application (no debuggers attached).
42+
* The volume of operations is high, don't use bulk for less than 1000 operations. Your provisioned throughput dictates how many operations per second you can process, your goal with bulk would be to utilize as much of it as possible.
43+
* Monitor the container for [throttling scenarios](troubleshoot-request-rate-too-large.md). If the container is getting heavily throttled it means the volume of data is larger than your provisioned throughput, you need to either scale up the container or reduce the volume of data (maybe create smaller batches of data at a time).
44+
3645
## <a name="capture-diagnostics"></a>Capture the diagnostics
3746

3847
All the responses in the SDK including `CosmosException` have a Diagnostics property. This property records all the information related to the single request including if there were retries or any transient failures.

0 commit comments

Comments
 (0)