A high-traffic website runs on EC2 and uses Kinesis Data Streams to collect web logs. The Kinesis consumer app, also on EC2, falls behind when data spikes and records are dropped. Which solution improves handling of the stream with the least operational overhead?
Choose an answer
Tap an option to check your answer.
Correct answer: Scale the Kinesis consumer horizontally by adding EC2 instances based on the CloudWatch GetRecords.IteratorAgeMilliseconds metric and increase the Kinesis stream retention period..
Why this is the answer
The correct solution addresses both the processing bottleneck and potential data loss. Scaling the Kinesis consumer horizontally by adding EC2 instances ensures that more consumers can process the data concurrently, preventing the application from falling behind during spikes. Using the GetRecords.IteratorAgeMilliseconds metric is a best practice for auto-scaling Kinesis consumers, as it directly indicates how far behind the consumer is. Increasing the Kinesis stream retention period provides a buffer, allowing the consumer more time to catch up without dropping records. Migrating to Lambda (option C) could work but might introduce new operational considerations and cost implications depending on the processing time per record. Adding more shards (option D) increases the stream's capacity but doesn't solve the consumer's inability to process existing data fast enough. Storing logs in S3 and using EMR (option A) is a different processing pattern, not directly addressing the real-time consumer falling behind on the Kinesis stream.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed