Design Swiggy's Real-Time Order Tracking System

Problem

Design the backend for Swiggy's live order tracking — where customers see the delivery agent's location update in real time on a map.

Requirements

Functional:

  • Customer sees agent location update every 5 seconds
  • ETA recalculation on each location update
  • Agent app sends GPS coordinates
  • Push notification on key milestones (order picked up, nearby)

Non-functional:

  • 2M concurrent active orders at peak
  • Location update latency < 3s end-to-end
  • 99.9% uptime

Discussion points

  1. Agent → server: HTTP polling vs WebSocket vs MQTT
  2. Server → customer: Server-Sent Events vs WebSocket
  3. Location storage: time-series DB vs Redis sorted set
  4. ETA model: static map + ML delta correction
  5. Geo-fence triggers for push notifications
added …
LeaderboardSalaryAccount