SAP-C02 · Question #487
A company has IoT sensors that monitor traffic patterns throughout a large city. The company wants to read and collect data from the sensors and perform aggregations on the data. A solutions architect
The correct answer is A. Reshard the stream to increase the number of shards in the stream. C. Use consumers with the enhanced fan-out feature. E. Use an error retry and exponential backoff mechanism in the consumer logic.. To resolve Kinesis Data Streams consumer throttling and ReadProvisionedThroughputExceeded errors, increase stream capacity by resharding, utilize enhanced fan-out for dedicated consumer throughput, and implement exponential backoff with retries in consumer logic.
Question
A company has IoT sensors that monitor traffic patterns throughout a large city. The company wants to read and collect data from the sensors and perform aggregations on the data. A solutions architect designs a solution in which the IoT devices are streaming to Amazon Kinesis Data Streams. Several applications are reading from the stream. However, several consumers are experiencing throttling and are periodically encountering a ReadProvisionedThroughputExceeded error. Which actions should the solutions architect take to resolve this issue? (Choose three.)
Options
- AReshard the stream to increase the number of shards in the stream.
- BUse the Kinesis Producer Library (KPL). Adjust the polling frequency.
- CUse consumers with the enhanced fan-out feature.
- DReshard the stream to reduce the number of shards in the stream.
- EUse an error retry and exponential backoff mechanism in the consumer logic.
- FConfigure the stream to use dynamic partitioning.
How the community answered
(46 responses)- A57% (26)
- B7% (3)
- D11% (5)
- F26% (12)
Why each option
To resolve Kinesis Data Streams consumer throttling and `ReadProvisionedThroughputExceeded` errors, increase stream capacity by resharding, utilize enhanced fan-out for dedicated consumer throughput, and implement exponential backoff with retries in consumer logic.
Increasing the number of shards in a Kinesis Data Stream increases the overall read throughput capacity, as each shard provides its own read limits for transactions and data volume, directly mitigating `ReadProvisionedThroughputExceeded` errors.
The Kinesis Producer Library (KPL) is used for efficient data *ingestion* into Kinesis streams, not for resolving consumer-side throttling issues.
The enhanced fan-out feature provides dedicated throughput to each consumer, eliminating contention for shared shard read capacity and allowing multiple consumers to read from the same shard concurrently without throttling.
Reducing the number of shards would decrease the total read capacity of the stream, which would exacerbate the `ReadProvisionedThroughputExceeded` errors.
Implementing an error retry with exponential backoff mechanism in consumer logic is a best practice for handling transient errors like throttling, allowing consumers to gracefully recover and reduce the immediate request rate after encountering `ReadProvisionedThroughputExceeded`.
Dynamic partitioning is primarily a producer-side concept related to distributing data across shards based on partition keys, and does not directly address consumer read throughput limitations.
Concept tested: Kinesis Data Streams scalability, consumer throttling, error handling
Source: https://docs.aws.amazon.com/streams/latest/dev/troubleshooting-consumer.html
Community Discussion
No community discussion yet for this question.