A fleet management system collects real-time telemetry from active vehicles. The data is ingested into an Amazon DynamoDB table. The application uses the current date (formatted as `YYYY-MM-DD`) as the partition key. During peak commuting hours, the application experiences frequent write throttling (`ProvisionedThroughputExceededException`), even though the total consumed capacity is well below the table's overall provisioned write capacity. Which design modification should a solutions architect implement to resolve this database performance bottleneck?
- AConfigure the DynamoDB table with a static high provisioned write capacity mode to handle spiky, unpredictable traffic instead of utilizing on-demand capacity mode.
- Modify the partition key design to append a random integer suffix to the date, distributing the write operations across multiple physical partitions.Answer
- CChange the partition key to a monotonically increasing timestamp to ensure that incoming data is sequentially ordered and indexed.
- DMigrate the database to Amazon RDS for PostgreSQL in a Multi-AZ deployment, and configure the application to promote the read replicas to primary during peak write spikes.
Answer
Modify the partition key design to append a random integer suffix to the date, distributing the write operations across multiple physical partitions.
The correct option outlines write sharding. By appending a random integer suffix to the date partition key, the writes are spread across multiple physical partitions. This distributes the high write rate and stays well within individual partition limits.
Step-by-Step Solution
Key Concept
Write Sharding / Synthetic Partition Keys in DynamoDB