A logistics company is building a package tracking system that needs to ingest updates from various transit hubs. A solutions architect is designing an Amazon DynamoDB table to store these status updates. The system must support high-throughput write operations with sub-10 millisecond latency. Which partition key design should the solutions architect choose to maximize database write performance and avoid partition throttling?
- A unique Package ID as the partition keyAnswer
- BThe date of the update formatted as YYYY-MM-DD as the partition key
- CA constant static string value as the partition key and the update timestamp as the sort key
- DA sequential auto-incrementing integer identifier as the partition key
Answer
A unique Package ID as the partition key
A unique Package ID provides a wide distribution of values (high cardinality). Amazon DynamoDB hashes this key to determine the physical partition for the item. High cardinality ensures that writes are evenly distributed across all partitions, maximizing overall write capacity and preventing write bottlenecks.
Step-by-Step Solution
Key Concept
Amazon DynamoDB partition key design and partition distribution
Estimated Time:50s