A logistics company is designing an IoT fleet management platform for delivery vehicles. Each vehicle transmits telemetry data every seconds. The storage layer must support write ingestion at scale and enable real-time queries for vehicle locations with sub-millisecond read latency. While the write traffic is evenly distributed across the fleet, read requests are highly concentrated: a small subset of high-priority delivery vehicles (representing less than of the active fleet) is queried hundreds of times per second for live tracking dashboards. Which database design meets these performance requirements while optimizing costs?
- AAmazon RDS for PostgreSQL configured with a Multi-AZ deployment and a Read Replica, routing all read queries to the Read Replica and promoting the Read Replica to the primary DB instance if write latency spikes.
- BAmazon DynamoDB with a partition key of `timestamp` and a sort key of `vehicle_id`, fronted by Amazon DynamoDB Accelerator (DAX) to cache read requests.
- Amazon DynamoDB with a partition key of `vehicle_id` and a sort key of `timestamp`, fronted by Amazon DynamoDB Accelerator (DAX) to cache read queries for the high-priority vehicles.Cevap
- DAmazon DynamoDB with a partition key of `vehicle_id` and a sort key of `timestamp`, using DynamoDB Auto Scaling in provisioned capacity mode with local secondary indexes (LSIs) to handle the read spikes.
Cevap
Amazon DynamoDB with a partition key of vehicle_id and a sort key of timestamp, fronted by Amazon DynamoDB Accelerator (DAX) to cache read queries for the high-priority vehicles.
The correct database design uses Amazon DynamoDB with a partition key of vehicle_id, which provides high cardinality and evenly distributes write requests across partitions. Fronting the table with Amazon DynamoDB Accelerator (DAX) caches read requests for the hot vehicle IDs, delivering sub-millisecond read latency for the live dashboards and preventing partition read throttling in a cost-effective manner.
Adım Adım Çözüm
Anahtar Kavram
High-Performance DynamoDB design using high-cardinality partition keys and DynamoDB Accelerator (DAX) to resolve read hotspots.