A developer is building a high-throughput IoT logging application that writes status messages to an Amazon DynamoDB table. The write volume is approximately writes per second. The table is configured with provisioned Write Capacity Units (WCUs). The primary key of the table is configured with `LogDate` (formatted as YYYY-MM-DD) as the partition key and `LogTimestamp` as the sort key. During peak hours, the application receives a high volume of `ProvisionedThroughputExceededException` errors.
Which action should the developer take to resolve the write throttling issue?
- AIncrease the provisioned Write Capacity Units (WCUs) of the table to to accommodate the peak throughput.
- BModify the application to perform a Scan operation to distribute write requests across all physical partitions.
- Redesign the primary key to use a composite key consisting of a high-entropy attribute, such as a combination of DeviceID and LogDate, as the partition key.Answer
- DConfigure the AWS SDK client to initialize with hardcoded access keys of an IAM user that has administrator access to bypass the capacity limit.
Answer
Redesign the primary key to use a composite key consisting of a high-entropy attribute, such as a combination of DeviceID and LogDate, as the partition key.
The correct answer is to redesign the primary key to use a composite partition key containing a high-entropy attribute, such as a combination of DeviceID and LogDate. This spreads the write request workload across multiple physical partitions, preventing a single partition from handling all the throughput and avoiding hot partition bottlenecks.
Step-by-Step Solution
Key Concept
Resolving DynamoDB throttling by designing high-entropy partition keys to distribute read and write throughput evenly across physical partitions.
Estimated Time:1m 30s