An Azure NoSQL database service for app development.
Hi @CLOUD - Semih BAY ,
Issue Summary
You reported increased latency on the CustomerDB.RefreshToken collection hosted on Azure Cosmos DB API for MongoDB in the West Europe region. Although the collection was configured with Autoscale RU/s and throughput was increased from 800-8000 RU/s to 1000-10000 RU/s, the application continued experiencing elevated response times, with Datadog traces showing end-to-end durations of approximately 10.2 seconds.
Investigation Performed
During our investigation, we reviewed:
- Azure Cosmos DB performance metrics and backend telemetry.
- Activity IDs and corresponding request durations provided by your team.
- Datadog traces showing the application request flow.
- MongoDB diagnostic logs from the beymen-log Log Analytics workspace.
- MongoDB C# Driver version 2.13.2.0 used by the application.
Our analysis confirmed:
- No sustained RU/s exhaustion was observed.
- No 429 (rate limiting/throttling) events were identified.
- All reviewed requests completed successfully with ErrorCode = 0.
- Cosmos DB server-side latency remained within expected ranges.
- Increasing RU/s did not improve the observed latency.
- The MongoDB operation durations were generally in the 2.0-2.6 second range, while Datadog reported approximately 10.2 seconds end-to-end latency.
Recommendations Provided
Based on the findings, we recommended reviewing:
- Application-side processing before and after database operations.
- Query patterns and indexing strategy for the RefreshToken collection.
- MongoDB driver connection pool configuration and behavior.
- Client-side retry and timeout settings.
- Network connectivity between the application and Cosmos DB.
- End-to-end application profiling and tracing to identify where additional latency is introduced.
Conclusion
Based on all diagnostics, logs, metrics, and traces reviewed, we did not identify evidence of a Cosmos DB platform-side performance issue. The available data indicates that throughput capacity was sufficient, no service-side throttling occurred, and backend latency remained within normal limits.
The findings suggest that a significant portion of the observed latency is likely occurring outside the Azure Cosmos DB service boundary, potentially within the application layer, networking path, client-side processing, or related components.