CargoYatra
Blog
Engineering

Building real-time tracking at scale

Live tracking looks simple to a customer and is anything but underneath. A look at the architecture that keeps every shipment honest.

Sita Gurung· May 28, 2026· 1 min read

Building real-time tracking at scale

To a customer, live tracking is a moving dot and an honest ETA. Underneath, it's a firehose of GPS pings, status events, and edge cases that all have to reconcile into one trustworthy timeline.

Engineering — Building real-time tracking at scale
Engineering · CargoYatra

The core problem

Devices drop offline. Pings arrive out of order. A parcel can be scanned "delivered" before its last GPS point lands. If you render events naively, the timeline flickers and customers stop trusting it.

Our approach

We treat every shipment as an ordered event log, not a set of columns to overwrite. Each status transition is validated against what's allowed next, and late-arriving pings are merged by timestamp rather than arrival order.

  • An append-only event model per shipment
  • Server-authoritative state machine for valid transitions
  • Idempotent ingestion so a retried ping never double-counts

Why it matters

When the data model respects reality, the UI can stay calm. The dot moves smoothly, the ETA only changes when something real changes, and support stops fielding "where is my parcel" tickets.

Share X LinkedIn