A restaurant reservation system named TableReserve records guest bookings into an Amazon DynamoDB table. During peak hours, the application experiences performance degradation and receives multiple ProvisionedThroughputExceededException errors when writing reservation records. The table's partition key is ReservationDate (formatted as YYYY-MM-DD), causing all write requests for a specific date to target the same partition. Which TWO actions should the developer take to resolve these throttling issues and improve partition write distribution? (Select TWO.)
- Append a random hash or suffix to the partition key value when writing records to distribute the write load.Cevap
- Migrate the DynamoDB table from provisioned capacity mode to on-demand capacity mode to handle traffic spikes automatically.Cevap
- CIncrease the Amazon SQS queue visibility timeout to give the application more time to process the reservation messages.
- DModify the application code to retrieve data using Scan operations instead of Query operations.
- EHardcode static AWS credentials in the AWS SDK client initialization to eliminate request authorization latency.
Cevap
The correct actions are appending a random suffix to the partition key value and migrating the table to on-demand capacity mode.
The correct solution involves appending a random suffix to the partition key (write sharding) to distribute writes across multiple partitions and migrating to on-demand capacity mode to handle reservation spikes dynamically.
Adım Adım Çözüm
Anahtar Kavram
Resolving DynamoDB throttling issues by redesigning the partition key schema (sharding) and adjusting the table capacity mode.