← Lessons

quiz vs the machine

Platinum1820

System Design

The ETA Prediction Service

Estimating arrival time by blending route structure, live conditions, and learned patterns.

6 min read · advanced · beat Platinum to climb

More than distance over speed

An estimated time of arrival is not just route length divided by a speed limit. Real travel time depends on traffic, time of day, weather, turns, and stops. A good ETA service learns these patterns from historical trips rather than guessing.

A layered estimate

  • Baseline from the route. Start with the planned route and its segment level speeds.
  • Live adjustment. Fold in current traffic from real time location streams.
  • Learned correction. A model trained on past trips corrects for systematic errors like intersections that always run slow.

Serving it reliably

  • ETAs are requested constantly, so segment predictions are cached and composed per route.
  • The service must degrade gracefully, falling back to historical averages when the live or model layer is unavailable.
  • Quality is tracked by comparing predicted to actual arrival, and the gap feeds back into training.

Key idea

An ETA service composes a route baseline, live conditions, and learned corrections, while degrading to historical averages when layers fail.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is distance divided by speed limit a poor ETA?

2. How should an ETA service behave when its live or model layer fails?