Question

Difficulty: MediumResolving DynamoDB Throttling and Key Distribution Issues

A ride-sharing booking application named 'CabFlow' processes ride requests using an Amazon DynamoDB table. During a major city-wide holiday event, the application experiences a massive surge in booking requests, resulting in `ProvisionedThroughputExceededException` errors. Monitoring indicates that the write requests are heavily concentrated on a partition key representing the current hour and city (e.g., `20260715-NYC`), creating a hot partition, while the table's overall provisioned capacity is not fully utilized. Which of the following actions should the developer take to resolve this key distribution and throttling issue? (Select TWO options.)

  1. Append a randomized integer suffix to the partition key value before writing data to distribute the load across multiple partition keys.Answer
  2. Configure the AWS SDK client in the application to implement exponential backoff and jitter for retrying failed requests.Answer
  3. C
    Increase the visibility timeout of the incoming Amazon SQS queue to allow more processing time for individual write operations.
  4. D
    Replace the query operations with Scan operations to search the table without relying on the partition key.
  5. E
    Hardcode AWS access keys directly in the client configuration to speed up authentication and authorization checks on subsequent requests.

Answer

Modify the partition key schema by appending a randomized suffix to distribute the write load, and configure the AWS SDK client to use exponential backoff and jitter for retries.
To fix DynamoDB throttling caused by hot partitions, developers should distribute the write requests across multiple partitions. This is accomplished by sharding the partition keys (adding a random suffix). In addition, configuring the SDK client to implement exponential backoff and jitter allows the application to retry transient failures without overloading the database.

Step-by-Step Solution

1
Analyze the DynamoDB write pattern to identify the root cause of the throughput issue.
Identified a hot partition key problem due to low cardinality (all writes using the same hour-city key).
Resolving throttling requires distributing keys across partitions or managing retry behavior.
2
Implement write sharding (salting) by appending a random integer suffix to the partition key.
Writes are evenly distributed across different partition key values (e.g., `20260715-NYC-1` to `20260715-NYC-N`).
This allows DynamoDB to store and process the data across multiple physical partitions, utilizing the total allocated throughput.
3
Configure the application's SDK client to handle transient write failures gracefully.
The SDK retries failed operations using exponential backoff and jitter.
This avoids overwhelming the database with immediate retries and helps the application recover from temporary load spikes.

Key Concept

Resolving DynamoDB throttling issues by addressing hot partition keys through write sharding (salting) and handling client-side retries with backoff and jitter.
Rate this question