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.)
- Append a randomized integer suffix to the partition key value before writing data to distribute the load across multiple partition keys.Answer
- Configure the AWS SDK client in the application to implement exponential backoff and jitter for retrying failed requests.Answer
- CIncrease the visibility timeout of the incoming Amazon SQS queue to allow more processing time for individual write operations.
- DReplace the query operations with Scan operations to search the table without relying on the partition key.
- EHardcode 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
Key Concept
Resolving DynamoDB throttling issues by addressing hot partition keys through write sharding (salting) and handling client-side retries with backoff and jitter.