Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

spring-data-cosmosdb Read/Write latency issue #542

@linux-code

Description

@linux-code

Hi,
Can someone help me to understand below issue-

Observing [60-120] ms response time for one read call (service to cosmos-db):
Using below client and configuration-

  1. spring-data-cosmosdb (2.3.0) with sync API(@EnableCosmosRepositories)
  2. Not using any cross-partition Query.
  3. Connection Mode- GATEWAY
  4. DEFAULT_MAX_POOL_SIZE = 100;
  5. DEFAULT_IDLE_CONNECTION_TIMEOUT_IN_MILLIS = 60 * 1000;
  6. Server and CosmosDB are in the same geographical location.
  7. SESSION consistency policy.
  8. Document is flat and small in size.

As per cosmosDB documentation - Read call takes <= 10 ms and Write call takes <=15 ms

According to above metrics, my client is taking 12 times greater than above time(10 ms) in worst case.

Could you please let me know, is this expected behaviour or I am missing some configuration here. Do you have any metrics which shows latency vs configuration factors for sync/reactive repository.

Note- I have tried to change Connection Mode to DIRECT Mode(as per best practices recommendation), but getting resources are no longer available warning. Is this mode supported in spring-data-cosmosdb (2.3.0)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions