A Kinesis data stream that feeds features to a model starts rejecting writes at peak with throughput exceeded errors. What fixes the capacity issue?
- Exam domain
- Data Preparation for ML and AI28% of the exam
- Difficulty
- Medium
- In this mock
- 24 questions on this domainPractise this domain
Why the exam asks this
Task 1.1: Collect and store data.
Objective in the exam guide: Skill 1.1.3: Troubleshoot and debug data ingestion and storage issues that involve capacity and scalability.
Streaming features stop flowing at the busiest moment unless capacity is planned. Diagnosing throughput errors quickly keeps real-time models fed.
Why B is the answer
Increase the stream's shard count, or use on-demand capacity mode
Kinesis capacity scales with shards, so throughput errors mean the stream needs more shards.
Remember: Kinesis throughput errors: add shards.
How it works
Amazon Kinesis Data Streams divides a stream into shards, and each shard has a fixed capacity for writes and reads.
When producers exceed that capacity, writes are throttled with throughput exceeded errors.
Adding shards, by resharding or using on-demand capacity mode, raises the stream's capacity.
Clues in the question
The words that point to the answer, and what each one tells you.
- Throughput exceeded errors
- The stream is at capacity.
- At peak
- Load spikes beyond the shards' limits.
In detail
- Each shard has a fixed write and read capacity.
- Resharding splits shards to add capacity.
Side by side with look-alikes
| Action | Fixes stream capacity? |
|---|---|
| More shards or on-demand mode | Yes |
| Lower temperature | No |
| More epochs | No |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Move the stream to a different S3 bucketWrong
A stream does not live in an S3 bucket.
B. Increase the stream's shard count, or use on-demand capacity modeRight
Kinesis throughput errors: add shards.
C. Lower the model's temperatureWrong
Temperature is a generation setting.
D. Add more training epochsWrongMost tempting
Training epochs do not affect ingestion.
Why it tempts: The stream feeds a model, so a model change can seem relevant. But the bottleneck is ingestion capacity.
In practice
- Choose partition keys that spread records evenly across shards.
- Alarm on throttled writes before customers notice.
Use case
An illustrative scenario, not a real incident.
A team splits its busiest shards before a sale, and peak writes succeed.
See how it works
xychart-beta x-axis ["2 shards", "4 shards", "8 shards"] y-axis "Relative write capacity" 0 --> 10 bar [2, 4, 8] line [5, 5, 5]
How to read this chart
- The bars are the stream's write capacity at each shard count.
- The flat line is peak demand.
- With two shards, peak demand exceeds capacity and writes are throttled; with eight there is headroom.