#40HardLocation, Geospatial & Ride-Hailing

Find a Rider for Uber or Uber Eats

ASKED IN INTERVIEWS AT:MetaUberGoogleMicrosoft

EXECUTIVE SUMMARY & PROBLEM STATEMENT

Design the core ride-dispatch matching algorithm that pairs incoming ride/order requests with optimal nearby drivers based on ETA, ratings, and route optimization.

SCALE ESTIMATION & TRAFFIC ENVELOPE

DAILY ACTIVE USERS / TPS15 Million daily completed trips globally
READ / WRITE TRAFFIC RATIOReal-time dispatch optimization
5-YEAR STORAGE CAPACITYIn-memory dispatch graph state

FUNCTIONAL REQUIREMENTS

  • [1]Match rider to best available driver in geographical proximity
  • [2]Support batch dispatching to optimize overall city wait times
  • [3]Handle driver accept/reject timeouts

NON-FUNCTIONAL REQUIREMENTS

  • •Dispatch response in < 5 seconds
  • •Maximized system efficiency (minimized total city ETA)
  • •Fair driver distribution

CORE ARCHITECTURAL COMPONENTS

Dispatch Orchestrator
Batch Aggregator (10s window)
H3 Spatial Candidate Filter
Bipartite Graph Solver
Push Notification Gateway

DATA SCHEMA & PERSISTENCE

RideRequest: id, rider_id, pickup_h3, dest_h3, matched_driver_id, status

DISTRIBUTED TRADE-OFFS & FAILURE MODES

  • ⟡Batch matching requests over a 10-second interval yields 15% shorter average customer wait times than instant greedy first-come matching.