Assuming that the initial number of shards in the Kinesis data stream is 4, and after resharding the number of shards increased to 6, what is the maximum number of EC2 instances that can be deployed to process data from all the shards?
12
6
4
1
Explanations:
With 6 shards, the Kinesis Client Library (KCL) can distribute the workload across multiple EC2 instances, but it doesn’t imply 12 EC2 instances are needed. KCL attempts to balance the number of instances for efficiency, and scaling beyond 6 instances is unnecessary.
After resharding, the number of shards is 6. The KCL allows at most one EC2 instance per shard. Thus, with 6 shards, the maximum number of EC2 instances that can be deployed is 6.
Initially, there were 4 shards, but after resharding, the number of shards increased to 6. The maximum number of EC2 instances is based on the number of shards, which is now 6, not 4.
Only 1 EC2 instance is not sufficient to handle 6 shards. Since there are 6 shards after resharding, it requires at least 6 EC2 instances to handle the load properly.