microsoft / azure-spring-boot

Spring Boot Starters for Azure services
MIT License
374 stars 460 forks source link

Bottlenecking in queries #928

Closed mnolan98-tmk closed 3 years ago

mnolan98-tmk commented 4 years ago

Environment

Summary

We are encountering an issue with interactions being throttled/bottlenecked when interacting with async queies to cosmos. The cosmos execution has been verified to < 40ms, but we encounter the blocking thread layer of Reactor (used by Azure Spring) to block 4+ seconds in some cases.

Reproduce steps

Via Spring Azure Data API for Cosmos, execute a custom query (can either use or not use a partition key

Expected Results

Expected a slight overhead for network latency and threading coordination

Actual Results

Random queries park on the thread blocking used by the API for much longer than the 40ms corresponding which we see. The image attached was taken from AppDynamics showing that from our code, to the internal parking of Reactor - that park operation used within that library (which is out of our control when using the SDK) is causing a severe bottleneck. This is occurring even when we have near to zero load on the server.

Azure Spring Bug

saragluna commented 4 years ago

@kushagraThapar could you please help take a look at this?

chenrujun commented 3 years ago

Closing this issue. Because it's not active for a long time. If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues

mnolan98-tmk commented 3 years ago

This is inactive because no one ever responded. Was anyone able to find the cause or recreate the issue?

Please know that we've stopped using Cosmos DB going forward as a result of this.