DVA-C03 practice question: Streaming data with Kinesis (1 of 2)
Development with AWS Services A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A smart-meter platform writes readings to an Amazon Kinesis data stream with 20 shards.
Each producer sets the partition key to the region name, and there are only four regions. The stream shows write throttling on a few shards, while the other shards are nearly idle and total traffic is far below the stream capacity.
What should the developer change?
Choose one answer.
AA. Use the meter ID as the partition key, since every meter has its own value.
BB. Double the stream to 40 shards, so that each shard receives fewer records.
CC. Change the producers from PutRecords to PutRecord, so that each record is sent in its own call.
DD. Use the region name together with the year and month as the partition key, so the key changes every month.
B. Wrong: With only four partition key values, the records still land on at most four shards. The extra shards would sit idle.
C. Wrong: One record per call changes how requests are batched, not which shard each record goes to. The same few shards stay overloaded.
D. Wrong: This adds little variety. In any given month there are still only four key values, so the same few shards remain hot.
Explanation
Kinesis hashes each partition key to choose a shard, so all records with the same key go to the same shard. Four key values mean at most four busy shards, however many shards the stream has. A key with many distinct values spreads the writes evenly across the stream.
Want more on Streaming data with Kinesis? The 5 full-length practice sets have 10 more Streaming data with Kinesis questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →