A logistics company is designing an asset tracking system to ingest real-time location telemetry from a fleet of delivery vehicles. The system must support a write volume that is highly unpredictable and spiky, peaking at writes per second. Each telemetry message contains a timestamp, a unique vehicle identifier, and coordinate data. Lookups for the latest vehicle locations must achieve sub-millisecond latency. Which database design and configuration meets these performance requirements?
- ADeploy an Amazon RDS for PostgreSQL database in a Multi-AZ deployment. Configure multiple Read Replicas, and route write operations to the Read Replicas to distribute the write load and achieve sub-millisecond write latency.
- Configure an Amazon DynamoDB table in On-Demand capacity mode using a partition key that combines the vehicle identifier and a date string (e.g., `VehicleID_YYYY-MM-DD`). Enable Amazon DynamoDB Accelerator (DAX) to cache read queries.Answer
- CConfigure an Amazon DynamoDB table in On-Demand capacity mode using a partition key consisting of a monotonically increasing timestamp. Enable Amazon DynamoDB Accelerator (DAX) to cache read queries.
- DConfigure an Amazon DynamoDB table in Provisioned Capacity mode using a partition key that combines the vehicle identifier and a date string (e.g., `VehicleID_YYYY-MM-DD`). Rely on DynamoDB Auto Scaling to scale write capacity to meet the sudden, unpredictable spikes in write traffic.
Answer
Configure an Amazon DynamoDB table in On-Demand capacity mode using a partition key that combines the vehicle identifier and a date string (e.g., `VehicleID_YYYY-MM-DD`), and enable Amazon DynamoDB Accelerator (DAX) to cache read queries.
The correct answer combines a high-cardinality partition key (`VehicleID_YYYY-MM-DD`) to distribute write operations evenly across partitions, DynamoDB On-Demand capacity mode to automatically and instantly scale to accommodate sudden and unpredictable write spikes, and Amazon DynamoDB Accelerator (DAX) to provide the required sub-millisecond read latency.
Step-by-Step Solution
Key Concept
Designing high-performing, scalable DynamoDB tables with appropriate partition keys, capacity modes, and caching to avoid bottlenecks and deliver low latency.