A food delivery service is designing a real-time tracking application. The application must store and query the geographic coordinates of active delivery couriers. These coordinate updates occur every seconds for each courier. The application needs to query this dataset to find the nearest couriers to a restaurant, requiring under millisecond latency. The location data is temporary, and the service must guarantee that any record older than minutes is immediately removed to prevent stale tracking and excessive storage usage. Which AWS database service is the most appropriate solution for this application?
- AAmazon RDS for PostgreSQL
- BAmazon DynamoDB
- Amazon ElastiCache (Redis OSS)Answer
- DAmazon DocumentDB (with MongoDB compatibility)
Answer
Amazon ElastiCache (Redis OSS)
Amazon ElastiCache (Redis OSS) is the correct service because it is an in-memory data store capable of sub-millisecond latency. It features native geospatial indexing to find nearby coordinates and supports immediate, synchronous key expiration (TTL) to guarantee that location data older than minutes is removed instantly.
Step-by-Step Solution
Key Concept
Selecting specialized AWS database services based on transactional latency, data structures (geospatial), and data lifecycle management requirements.
Estimated Time:2m 0s