Question

Difficulty: MediumData Store Operations with Amazon DynamoDB

A developer is building a high-throughput IoT logging application that writes status messages to an Amazon DynamoDB table. The write volume is approximately 500500 writes per second. The table is configured with 10001000 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?

  1. A
    Increase the provisioned Write Capacity Units (WCUs) of the table to 20002000 to accommodate the peak throughput.
  2. B
    Modify the application to perform a Scan operation to distribute write requests across all physical partitions.
  3. 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
  4. D
    Configure 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

1
Analyze the cause of the ProvisionedThroughputExceededException errors when total provisioned capacity (10001000 WCUs) exceeds the write volume (500500 writes per second).
Identify that the partition key LogDate has low entropy (same value for all writes on a given day), directing all traffic to a single partition.
To understand why throttling occurs even though the total table throughput limit is not reached.
2
Determine the capacity limits of a single DynamoDB partition.
A single partition can support a maximum of 10001000 WCUs or 30003000 RCUs.
Explain why writing 500500 items per second to a single partition can trigger throttling if there are small bursts, and why increasing overall table WCUs will not resolve this limitation.
3
Evaluate key design strategies to distribute the write load.
Creating a composite partition key using DeviceID and LogDate distributes writes across multiple partitions based on the device ID.
To select a schema design that leverages DynamoDB's partitioning architecture to handle the required throughput.

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
Rate this question