A logistics enterprise is designing a real-time fleet tracking system that must ingest and process location updates from over active delivery vehicles. The system expects a write workload of up to writes per second. Customer dashboards require real-time tracking updates with read latency under . The database must scale automatically to handle peak traffic during holiday seasons without performance degradation or partition bottlenecks. Which database architecture provides the highest performance and scalability for this application?
- AAmazon Aurora PostgreSQL with a single primary instance and a Read Replica in a separate Availability Zone, designating the Read Replica as the primary disaster recovery target via manual failover.
- BAmazon DynamoDB with `delivery_date` (formatted as `YYYY-MM-DD`) as the partition key and `delivery_id` as the sort key, utilizing DynamoDB Accelerator (DAX) to optimize write throughput.
- Amazon DynamoDB with `delivery_id` as the partition key and `status_timestamp` as the sort key, utilizing DynamoDB Auto Scaling to manage capacity.Cevap
- DAmazon RDS for PostgreSQL in a Multi-AZ deployment, using Read Replicas as the direct, automatic failover targets to handle both write and read traffic during peak periods.
Cevap
Use Amazon DynamoDB with `delivery_id` as the partition key and `status_timestamp` as the sort key, utilizing DynamoDB Auto Scaling to manage capacity.
The correct design uses Amazon DynamoDB with a high-cardinality partition key (`delivery_id`) and a sort key (`status_timestamp`). This distributes writes evenly across multiple physical partitions, preventing write throughput bottlenecks. DynamoDB Auto Scaling dynamically adjusts provisioned throughput based on traffic, satisfying both high-throughput write and low-latency read requirements.
Adım Adım Çözüm
Anahtar Kavram
Amazon DynamoDB partition key design and scaling for high-throughput write workloads.
Tahmini Süre:2m 0s