DVA-C02 practice question 33 of 35
An application ingests data from an Amazon Kinesis data stream. The shards in the data stream are set for normal traffic. During tests for peak traffic, the application ingests data slowly. A developer needs to adjust the data stream to handle the peak traffic. What should the developer do to meet this requirement MOST cost-effectively?
Full set: 598 questionsDomain Development with AWS Services
The throughput of an Amazon Kinesis data stream is directly proportional to its number of shards. Each shard provides a fixed write capacity of 1 MB/s or 1,000 records/s. When data ingestion slows during peak traffic, it indicates that the producers are being throttled because the stream's total write capacity is exceeded. The most direct and cost-effective solution for a provisioned stream with predictable peaks is to increase the number of shards using the UpdateShardCount API operation. This process, known as resharding, scales the stream's capacity to handle the higher load.
A. The Kinesis Producer Library (KPL) optimizes writes through aggregation and batching but cannot overcome the fundamental throughput limits of the stream's shard configuration. The stream itself is the bottleneck.
B. Switching to on-demand mode would solve the capacity issue but is generally less cost-effective than manually scaling a provisioned stream for predictable peak traffic, as on-demand pricing is higher.
C. The data retention period determines how long data is stored. It has no impact on the stream's ingestion rate or throughput capacity and will not resolve the slow ingestion problem.
1. AWS Kinesis Data Streams Developer Guide, "Changing the Number of Open Shards (Resharding)": "The throughput of a Kinesis data stream is a function of the number of shards. You can increase or decrease the number of shards in a stream as needed. For example, you can scale the number of shards up when data volume increases." This directly supports increasing the shard count to handle more traffic.
2. AWS Kinesis Data Streams Developer Guide, "Choosing the data stream capacity mode": "With provisioned mode, you specify the number of shards for the data stream. The total capacity of a data stream is the sum of the capacities of its shards... We recommend that you use the provisioned mode when your data traffic is predictable and you can forecast your capacity requirements." This confirms that for predictable traffic (like a peak test), provisioned mode with scaling is the intended, cost-effective pattern.
3. AWS Kinesis Data Streams API Reference, "UpdateShardCount": "This operation scales the shard count of the specified stream. Scaling the shard count is only supported for streams with the PROVISIONED shard count mode." This identifies the specific API call for the action described in the correct answer.
Keep practicing
Take the free DVA-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DVA-C02 practice questions
- Question 1A company has a multi-node Windows legacy application that runs on premises. The applicat…
- Question 2A developer migrated a legacy application to an AWS Lambda function. The function uses a …
- Question 3A development learn has an Amazon API Gateway REST API that is backed by an AWS Lambda fu…
- Question 4A company is expanding the compatibility of its photo-snaring mobile app to hundreds of a…
- Question 5A company has an ecommerce application. To track product reviews, the company's developme…
- Question 6A social media company is designing a platform that allows users to upload data, which is…
