System Design: Real-Time Courier Route Visibility Platform
Context
Design a parcel delivery platform that gives customers and operations real-time visibility into each courier’s route and live ETA for orders. The system must handle tens of thousands of couriers concurrently.
Requirements
-
Mobile apps publish GPS updates reliably from the field.
-
Backend ingests, processes, and streams location data in near real-time.
-
Compute routes and ETAs; display to customers and ops dashboards.
-
Expose APIs (e.g., GET /couriers/{id}/trace, GET /orders/{id}/eta).
-
Address:
-
Scale (tens of thousands of couriers)
-
Data storage for historical playback
-
Privacy and access control
-
Latency vs. consistency trade-offs
-
Offline mode and battery constraints
-
Map matching and geofencing
-
Failure handling and monitoring