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:
Partition Key -
applicationName - Uniquely identifies the application.
Sort Key
LeaseKey - To allow for get/updates of the specific lease.
Additionally, introduce a Global Secondary Index (GSI) to allow for listing all shards per stream per application.
Partition Key -
applicationName - Uniquely identifies the pipeline
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