A developer is troubleshooting an application named PixelStream that uploads high-resolution images. The application stores metadata in an Amazon DynamoDB table where the partition key is set to the upload date (formatted as YYYY-MM-DD). During peak hours, the application frequently encounters ProvisionedThroughputExceededException errors even though the table's overall consumed throughput is well below the provisioned write capacity limit. What is the most effective way to resolve this throughput issue?
- Redesign the partition key schema to use a more granular attribute, such as a unique Image ID, to distribute write requests evenly across partitions.Cevap
- BIncrease the Amazon SQS visibility timeout of the incoming queue to allow the consumers more time to write records to the table.
- CModify the application configuration to hardcode the AWS access keys and force the SDK client to throttle its own requests.
- DModify the application queries to perform table Scan operations instead of Query operations to read data from all partitions.
Cevap
Redesign the partition key schema to use a more granular attribute, such as a unique Image ID, to distribute write requests evenly across partitions.
Redesigning the partition key schema to use a high-cardinality attribute, such as a unique Image ID, spreads write operations across multiple physical partitions, preventing any single partition from exceeding its individual throughput limits.
Adım Adım Çözüm
Anahtar Kavram
Selecting a partition key with high cardinality to distribute write requests evenly and avoid hot partition bottlenecks.
Tahmini Süre:1m 0s