awslabs / amazon-kinesis-client

Client library for Amazon Kinesis
Apache License 2.0
641 stars 463 forks source link

Add support for multi-tenancy for lease coordination and management in KCL #1368

Open sb2k16 opened 1 month ago

sb2k16 commented 1 month ago

Problem Description

Currently, whenever a new KCL application is launched, it automatically creates a DynamoDB table for lease coordination and management for the specific application.

It would be nice to have KCL provide MultiTenant support such that multiple independent KCL applications (hosted in a single account) each consuming multiple Kinesis data streams be able to share a single DynamoDB table for lease coordination and management.

Proposed Solution The proposal is to have KCL support multi-tenancy for lease coordination and management through a single DynamoDB table with the relevant partition keys, range keys and indexes defined as required. Moreover, clients should also be offered to provide additional properties like SSE, TTL, etc.

Following Table schema could be used to support multi-tenancy. Table partition details:

Additionally, introduce a Global Secondary Index (GSI) to allow for listing all shards per stream per application.

New classes and overrides