Releases: awslabs/amazon-kinesis-client-ruby
Releases · awslabs/amazon-kinesis-client-ruby
Release 3.0.0 of the Amazon Kinesis Client for Ruby
Release 3.0.0 (November 6, 2024)
- New lease assignment / load balancing algorithm
- KCL 3.x introduces a new lease assignment and load balancing algorithm. It assigns leases among workers based on worker utilization metrics and throughput on each lease, replacing the previous lease count-based lease assignment algorithm.
- When KCL detects higher variance in CPU utilization among workers, it proactively reassigns leases from over-utilized workers to under-utilized workers for even load balancing. This ensures even CPU utilization across workers and removes the need to over-provision the stream processing compute hosts.
- Optimized DynamoDB RCU usage
- KCL 3.x optimizes DynamoDB read capacity unit (RCU) usage on the lease table by implementing a global secondary index with leaseOwner as the partition key. This index mirrors the leaseKey attribute from the base lease table, allowing workers to efficiently discover their assigned leases by querying the index instead of scanning the entire table.
- This approach significantly reduces read operations compared to earlier KCL versions, where workers performed full table scans, resulting in higher RCU consumption.
- Graceful lease handoff
- KCL 3.x introduces a feature called "graceful lease handoff" to minimize data reprocessing during lease reassignments. Graceful lease handoff allows the current worker to complete checkpointing of processed records before transferring the lease to another worker. For graceful lease handoff, you should implement checkpointing logic within the existing
shutdownRequested()
method. - This feature is enabled by default in KCL 3.x, but you can turn off this feature by adjusting the configuration property
isGracefulLeaseHandoffEnabled
. - While this approach significantly reduces the probability of data reprocessing during lease transfers, it doesn't completely eliminate the possibility. To maintain data integrity and consistency, it's crucial to design your downstream consumer applications to be idempotent. This ensures that the application can handle potential duplicate record processing without adverse effects.
- KCL 3.x introduces a feature called "graceful lease handoff" to minimize data reprocessing during lease reassignments. Graceful lease handoff allows the current worker to complete checkpointing of processed records before transferring the lease to another worker. For graceful lease handoff, you should implement checkpointing logic within the existing
- New DynamoDB metadata management artifacts
- KCL 3.x introduces two new DynamoDB tables for improved lease management:
- Worker metrics table: Records CPU utilization metrics from each worker. KCL uses these metrics for optimal lease assignments, balancing resource utilization across workers. If CPU utilization metric is not available, KCL assigns leases to balance the total sum of shard throughput per worker instead.
- Coordinator state table: Stores internal state information for workers. Used to coordinate in-place migration from KCL 2.x to KCL 3.x and leader election among workers.
- Follow this documentation to add required IAM permissions for your KCL application.
- KCL 3.x introduces two new DynamoDB tables for improved lease management:
- Other improvements and changes
- Dependency on the AWS SDK for Java 1.x has been fully removed.
- The Glue Schema Registry integration functionality no longer depends on AWS SDK for Java 1.x. Previously, it required this as a transient dependency.
- Multilangdaemon has been upgraded to use AWS SDK for Java 2.x. It no longer depends on AWS SDK for Java 1.x.
idleTimeBetweenReadsInMillis
(PollingConfig) now has a minimum default value of 200.- This polling configuration property determines the publishers wait time between GetRecords calls in both success and failure cases. Previously, setting this value below 200 caused unnecessary throttling. This is because Amazon Kinesis Data Streams supports up to five read transactions per second per shard for shared-throughput consumers.
- Shard lifecycle management is improved to deal with edge cases around shard splits and merges to ensure records continue being processed as expected.
- Dependency on the AWS SDK for Java 1.x has been fully removed.
- Migration
- The programming interfaces of KCL 3.x remain identical with KCL 2.x for an easier migration. For detailed migration instructions, please refer to the Migrate consumers from KCL 2.x to KCL 3.x page in the Amazon Kinesis Data Streams developer guide.
- Configuration properties
- Metrics
- New CloudWatch metrics introduced in KCL 3.x are explained in the Monitor the Kinesis Client Library with Amazon CloudWatch in the Amazon Kinesis Data Streams developer guide. The following operations are newly added in KCL 3.x:
LeaseAssignmentManager
WorkerMetricStatsReporter
LeaseDiscovery
- New CloudWatch metrics introduced in KCL 3.x are explained in the Monitor the Kinesis Client Library with Amazon CloudWatch in the Amazon Kinesis Data Streams developer guide. The following operations are newly added in KCL 3.x:
Release 2.1.2 of the Amazon Kinesis Client for Ruby
Release 2.1.2 (January 22, 2025)
- Upgraded to use version 2.6.1 of the Amazon Kinesis Client library.
Release 2.1.1 of the Amazon Kinesis Client for Ruby
Release 2.1.0 of the Amazon Kinesis Client for Ruby
What's Changed
- Relicense to Apache-2.0 by @jpeddicord in #37
- Fix usage of --shards option by @davidor in #10
- Fix timeout option in sample producer by @davidor in #12
- Configure dependabot to scan dependencies by @zengyu714 in #45
- Upgrade Java dependencies to match KCL release v2.4.4 by @zengyu714 in #60
New Contributors
- @jpeddicord made their first contribution in #37
- @davidor made their first contribution in #10
- @zengyu714 made their first contribution in #45
Full Changelog: v2.0.0...v2.1.0
Release 2.0.0 of the Amazon Kinesis Client for Ruby
Release 2.0.0 (February 26, 2019)
- Added support for Enhanced Fan-Out.
Enhanced Fan-Out provides dedicated throughput per stream consumer, and uses an HTTP/2 push API (SubscribeToShard) to deliver records with lower latency. - Updated the Amazon Kinesis Client Library for Java to version 2.1.2.
- Version 2.1.2 uses 4 additional Kinesis API's
WARNING: These additional API's may require updating any explicit IAM policies - For more information about Enhanced Fan-Out with the Amazon Kinesis Client Library please see the announcement and developer documentation.
- Version 2.1.2 uses 4 additional Kinesis API's
- Added version 2 of the
RecordProcessorBase
which supports the newShardRecordProcessor
interface- The
shutdown
method from version 1 has been replaced bylease_lost
andshard_ended
. - Added the
lease_lost
method which is invoked when a lease is lost.
lease_lost
replacesshutdown(checkpointer, 'ZOMBIE')
. - Added the
shard_ended
method which is invoked when all records from a split or merge have been processed.
shard_ended
replacesshutdown(checkpointer, 'TERMINATE')
. - Added an optional method,
shutdown_requested
, which provides the record processor a last chance to checkpoint during the Amazon Kinesis Client Library shutdown process before the lease is canceled.- To control how long the Amazon Kinesis Client Library waits for the record processors to complete shutdown, add
timeoutInSeconds=<seconds to wait>
to your properties file.
- To control how long the Amazon Kinesis Client Library waits for the record processors to complete shutdown, add
- The
- Updated the AWS Java SDK version to 2.4.0
- MultiLangDaemon now provides logging using Logback.
- MultiLangDaemon supports custom configurations for logging via a Logback XML configuration file.
- The example Rakefile supports setting the logging configuration by adding
log_configuration=<log configuration file>
to the Rake command line.
Release 1.0.1 of the Amazon Kinesis Client for Ruby
Release 1.0.1 (January 19, 2017)
- Upgraded to use version 1.7.2 of the Amazon Kinesis Client library
Available on RubyGems.org as aws-kclrb.
Version 1.0.0 of the Amazon Kinesis Client Library For Ruby
v1.0.0 Updating the release date in the README.md file.