A news publishing platform named 'PressPulse' records real-time article view events in an Amazon DynamoDB table. The table is configured with provisioned write capacity and uses ArticleCategory as the partition key. During breaking news events, views for a single category spike dramatically, resulting in ProvisionedThroughputExceededException errors, even though the total consumed capacity is well below the table's total provisioned threshold. Additionally, the application's SDK client fails immediately without retrying when a write request is throttled. Which TWO actions should the developer take to resolve the throttling and improve application resilience? (Select TWO.)
- Append a random integer suffix to the partition key value before writing to distribute the write load across multiple partition keys.Answer
- Configure the AWS SDK client to use exponential backoff and jitter for retrying throttled write requests.Answer
- CIncrease the visibility timeout of the Amazon SQS queue that buffers incoming page view events.
- DExecute a Scan operation with a filter expression on the backend to distribute read and write capacity usage.
- EHardcode credentials for a secondary IAM user with full DynamoDB permissions in the SDK client configuration to bypass limits.
Answer
To resolve the throttling and improve resilience, append a random integer suffix to the partition key value (write sharding) and configure the AWS SDK client to use exponential backoff and jitter for retries.
Appending a random integer suffix to the partition key (such as ArticleCategory) distributes the write load across multiple partition keys and physical partitions, alleviating the hot partition throttling issue. Configuring the AWS SDK client with exponential backoff and jitter allows the application to handle transient throttling errors gracefully by spreading out retry attempts.
Step-by-Step Solution
Key Concept
Resolving DynamoDB throttling issues caused by hot partition keys using write sharding and configuring client-side SDK retry logic with backoff and jitter.