Interview's MateSystem Design
Interview's Mate

System Design

Architecture & trade-offs

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
All topics/Geo-Spatial & Location Systems
RELIABILITY, SECURITY & CASE STUDIES · SUBTOPIC

Driver Matching, Dispatch & Live ETA

Stream 4-second GPS pings, lock a driver atomically during offer dispatch, and compute road-network ETAs.

AdvancedPart of Geo-Spatial & Location Systems
Practice in AI HLD
Subtopics in Geo-Spatial & Location Systems (2)
OverviewGeohash, Quadtree, H3Dispatch & ETA

In plain words

Drivers ping their GPS every 4 seconds into fast RAM. When you tap "Request Ride", the matcher picks the closest cars by road ETA (not just straight-line crow-flies) and locks one driver for 15 seconds so two riders don’t get the same car.

Think of it like…

Air-traffic radar updating every few seconds + holding a cab on a 15-second reservation while the driver taps Accept.

Loading interactive diagram
Loading interactive exercise

Theory & how it works

Straight-line (Haversine) distance vs. Road-Network ETA

A driver 300 meters away across a river or highway median might actually be a 12-minute drive! First filter candidates quickly in Redis using H3/Geohash (~20 nearby drivers), then pass only those 20 to a fast Routing / Contraction Hierarchies ETA engine using live traffic speeds.

Key points & practical guide

Summary checklist

  • Keep live GPS pings in RAM (Redis) with 30s TTL; archive trip breadcrumbs asynchronously to Kafka/warehouse
  • Use short 15s distributed locks per candidate driver during dispatch
  • Filter with spatial grid first, then rank top candidates by real road ETA

When to use it

  • Uber/Lyft dispatch, DoorDash/Instacart courier matching

Watch out for

  • Offering the same driver simultaneously to 3 riders at peak hour

Quick check

Loading quiz
Previous subtopic
Geohash, Quadtrees & Uber H3
Back to overview
Full Geo-Spatial & Location Systems Lesson