Skip to content

Support for In-Memory Lease Container in Cosmos DB SDK v3 #5177

@sergeyltd

Description

@sergeyltd

Description:
We are requesting the implementation of an in-memory lease container in the Cosmos DB SDK v3. This feature, which was supported in the v2 SDK, has become private in the v3 SDK. Our service is self-sufficient, saving the current positions (continuation token) locally and allowing a restart to continue reading from the last saved position by initializing the in-memory lease container with the corresponding data.

Background:
Currently, our implementation utilizes a remote lease container to track progress and manage leases. However, this approach introduces additional costs and dependencies that we aim to eliminate. Moreover, the remote lease container does not allow initialization with locally saved positions. An in-memory lease container would provide a more reliable, efficient, and cost-effective solution, enabling us to maintain the state locally and reduce the overhead associated with supporting an additional Cosmos DB account for a remote lease container.

Requirements:

  1. In-Memory Lease Container: Implement an in-memory lease container that can track progress and manage leases locally. Ensure this container is reliable and can handle scenarios such as retrieving current positions and the continuation token for initialization.
  2. Initialization: The in-memory lease container should be capable of initializing leases on startup. It can be initialized in any of the following ways:
  • List of positions per each partition key range (lease)
  • Continuation token
  • Date and time

The benefits of this implementation include:

  • Cost Reduction: Eliminates the need for a remote lease container, reducing costs associated with maintaining and querying the remote container.
  • Improved Performance: Reduces latency and overhead by managing leases locally.
  • Better Reliability: Enhances reliability by ensuring that the service can restart and continue reading from the last saved position without external dependencies.
  • Simplified Architecture: Simplifies the architecture by removing dependencies on external containers.

We believe that these changes will significantly improve the efficiency and reliability of our service. Thank you for considering our request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions