Q59 — AWS DOP-C02 Ch.2

Question 59 of 100 | ← Chapter 2

A DevOps engineer manages a web application running on Amazon EC2. The application uses Amazon Kinesis Data Streams to ingest and process web logs. The DevOps engineer also manages a Kinesis consumer application running on Amazon EC2. A sudden spike in data volume causes the Kinesis consumer application to fall behind, and Kinesis data is discarded before records can be processed. The DevOps engineer must implement a solution to improve processing throughput. Which solution meets these requirements with the highest operational efficiency?

Correct Answer: B. Horizontally scale the Kinesis consumer application by adding more EC2 instances based on the Amazon CloudWatch GetRecords.IteratorAgeMilliseconds metric. Increase the Kinesis data stream retention period.

Explanation

Amazon Kinesis Data Streams manages throughput through shards, each with fixed processing capacity. When consumer application processing speed is insufficient, data may be discarded due to retention limits. Horizontal scaling of EC2 instances increases consumer processing capacity. The CloudWatch GetRecords.IteratorAgeMilliseconds metric monitors consumer lag in real time, reflecting how long records remain unprocessed; high values trigger scaling actions. Extending the Kinesis data stream retention period (default 24 hours, up to 7 days) provides buffer time to process backlogged data. Option B combines dynamic scaling with retention policy adjustment, directly addressing processing lag and preventing data loss. Option D increases shards but does not resolve insufficient consumer processing speed. Option C’s Lambda function faces execution duration and concurrency limitations, making it unsuitable for high-throughput scenarios. AWS recommends monitoring consumer lag with CloudWatch and scaling consumer instances to improve processing capacity (see AWS Kinesis Developer Guide).