A logistics company is designing an IoT tracking system that receives real-time location telemetry from delivery trucks. During peak operations, the application receives a high volume of write requests containing a truck ID, a current timestamp, and coordinates. The primary query pattern is to retrieve the historical route of a specific truck for a given day. The transmission rate of the telemetry fluctuates significantly throughout the day. Which database architecture and configuration should the solutions architect choose to meet these requirements with optimal write performance and cost-efficiency?
- ADeploy an Amazon DynamoDB table in on-demand capacity mode, setting the partition key as the timestamp and the sort key as the unique truck ID.
- BDeploy an Amazon RDS for MySQL Multi-AZ database, and write all telemetry to the primary instance. Scale the write performance by creating multiple read replicas, and configure them to act as the primary automatic failover targets.
- Deploy an Amazon DynamoDB table in on-demand capacity mode, setting the partition key as the unique truck ID and the sort key as the timestamp.Cevap
- DDeploy an Amazon DynamoDB table in provisioned capacity mode with a fixed read and write capacity, setting the partition key as the unique truck ID and the sort key as the timestamp.
Cevap
Deploy an Amazon DynamoDB table in on-demand capacity mode, setting the partition key as the unique truck ID and the sort key as the timestamp.
Deploying an Amazon DynamoDB table in on-demand capacity mode with the truck ID as the partition key is the optimal solution. The truck ID provides a high cardinality value, distributing the write load evenly across multiple partitions. The timestamp as the sort key allows historical querying of a specific truck's route. On-demand capacity mode automatically accommodates the fluctuating transmission rate without manual scaling or throttling.
Adım Adım Çözüm
Anahtar Kavram
DynamoDB Partition Key Design and Capacity Modes
Tahmini Süre:1m 30s