Question

Difficulty: EasyResolving DynamoDB Throttling and Key Distribution Issues

An e-commerce application named "FlashRetail" writes customer transaction records to an Amazon DynamoDB table. The table partition key is configured as the transaction date (format: YYYYMMDDYYYY-MM-DD). During a high-volume flash sale event, the application experiences write throttling and encounters ProvisionedThroughputExceededExceptionProvisionedThroughputExceededException errors, even though the total consumed capacity is well below the table's overall provisioned write limit.

Which of the following actions should the developer take to resolve this throttling issue?

  1. A
    Modify the application retrieval logic to use Scan operations instead of Query operations.
  2. B
    Increase the overall provisioned Write Capacity Units (WCUs) of the DynamoDB table.
  3. Redesign the partition key schema by appending a random suffix to the transaction date to distribute writes across multiple partition keys.Answer
  4. D
    Increase the Amazon SQS visibility timeout for the queue processing the incoming transaction messages.

Answer

Redesign the partition key schema by appending a random suffix to the transaction date to distribute writes across multiple partition keys.
The correct action is to redesign the partition key schema by appending a random suffix. The transaction date (YYYYMMDDYYYY-MM-DD) has low cardinality during a high-traffic event, causing all writes to target the same partition key. Appending a random suffix (sharding) distributes the write operations across multiple distinct partition key values (e.g., 20260714.12026-07-14.1, 20260714.22026-07-14.2), resolving the hot partition bottleneck.

Step-by-Step Solution

1
Analyze the table's partition key design and write patterns during the event.
The partition key is the transaction date, which causes all write operations on a given day to target the exact same partition key value.
When all writes target a single partition key value, a hot partition is created, leading to local throttling even if the table-wide provisioned capacity is not fully consumed.
2
Evaluate remediation options to distribute the write load.
Adding a random suffix (e.g., a number from 1 to N) to the transaction date splits the single hot partition key into multiple distinct partition key values.
Distributing the writes across multiple partition key values ensures that traffic is spread across different physical partitions, resolving the single-partition throughput bottleneck.

Key Concept

Avoiding hot partitions in DynamoDB by distributing writes using partition key sharding (adding random suffixes).
Estimated Time:45s
Rate this question