A logistics routing application named ShipVerify processes shipment status updates and writes them to an Amazon DynamoDB table. The table uses ShipmentID as the partition key. During peak delivery hours, the application experiences a surge in updates for a small subset of high-volume merchant shipments. This results in frequent ProvisionedThroughputExceededException errors, even though the overall write capacity units consumed by the table are well below the provisioned limits. Which of the following actions should the developer take to resolve this issue?
- AChange the read operations in the application to execute a table Scan rather than a Query to locate shipment records.
- Redesign the partition key schema by appending a random suffix to the partition key value for high-volume shipments to distribute writes across multiple partition keys.Cevap
- CIncrease the visibility timeout of the Amazon SQS queue that feeds the updates to ensure messages are not retried too quickly.
- DHardcode the AWS IAM access keys directly within the AWS SDK client configuration to reduce latency from credential retrieval.
Cevap
Redesign the partition key schema by appending a random suffix to the partition key value for high-volume shipments to distribute writes across multiple partition keys.
The correct answer is correct because appending a random suffix to the partition key (write sharding) distributes writes across multiple partitions. This prevents a single partition key from absorbing all the write volume and exceeding the per-partition throughput limit of DynamoDB.
Adım Adım Çözüm
Anahtar Kavram
Write sharding using random suffixes to distribute traffic on a hot partition key in DynamoDB.