A logistics delivery application named 'RouteSpeed' updates the status of packages in an Amazon DynamoDB table. The partition key is `delivery_date` and the sort key is `package_id`. During peak delivery hours on a major shopping holiday, the application encounters a high rate of `ProvisionedThroughputExceededException` errors. CloudWatch metrics indicate that the table's total consumed write capacity is well below the provisioned write capacity.
Which TWO actions should the developer take to resolve these throttling issues? (Select TWO.)
- Redesign the partition key schema by appending a randomized or calculated suffix to the partition key value to distribute write requests across multiple physical partitions.Cevap
- Configure the AWS SDK client in the application to use exponential backoff and jitter for retrying throttled write requests.Cevap
- CIncrease the visibility timeout of the Amazon SQS queue that feeds the status updates to the application to prevent messages from returning to the queue.
- DModify the application to perform a Scan operation instead of a Query operation to verify if a package partition has available capacity before writing.
- EHardcode static AWS credentials in the application's SDK client configuration to bypass the default credential provider chain and reduce connection establishment latency.
Cevap
To resolve the throttling issues, the developer must redesign the partition key schema by appending a suffix to distribute writes and configure the AWS SDK client to use exponential backoff and jitter for retrying failed requests.
Redesigning the partition key by appending a randomized or calculated suffix distributes the write load across multiple physical partitions, preventing a single partition from becoming hot. Additionally, configuring the SDK client with exponential backoff and jitter ensures that the application handles temporary write spikes gracefully by retrying requests after increasing delays.
Adım Adım Çözüm
Anahtar Kavram
Mitigating DynamoDB hot partitions and using SDK retry strategies