Live courier tracking

DesignMedium45 minDoorDash and Uber style

Your task

Design the live courier-tracking feature where a customer watching an order in progress sees the courier's marker move on a map in near real time, and the courier also shares ETA updates. At peak there are ~2M active deliveries being watched, each courier emits a location every 3-5 seconds, and a delivery may be watched by 1-3 people. Locations should reach the watcher within ~2-3 seconds. Describe the transport, the fan-out from one courier to its watchers, how you handle the mobile client connecting/reconnecting, and the trade-off between push frequency and battery/bandwidth.

It covers

  • Live sharing
  • Fan out
  • Websockets