Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Design Real-Time Dispatch Optimization

Hard
System DesignML RankingFeature StoreRetrieval

Problem

Product Context

SwiftRoute is a same-day delivery platform that matches incoming delivery jobs to a fleet of drivers across 40 cities. The dispatch system must assign each order to the best vehicle and continuously adapt routes as traffic, cancellations, and new jobs arrive.

Scale

SignalValue
DAU8M customers, 220K active drivers/day
Peak order creation QPS18K jobs/sec globally
Concurrent active vehicles95K
Daily completed jobs32M
Service area graph12M road segments across all cities
Per-dispatch latency budget (p99)800ms end-to-end

Task

Design an end-to-end ML-powered dispatch optimization system. Your solution should address:

  1. How you would frame the problem: assignment, ETA prediction, route optimization, and re-dispatch under changing conditions
  2. A multi-stage architecture for candidate vehicle retrieval, dispatch ranking, and final constrained re-ranking / optimization
  3. What algorithms or models you would use at each stage, and when you would prefer heuristics / OR methods over learned models
  4. Offline and online data pipelines, including labels, feature freshness, and feedback loops
  5. Evaluation strategy across offline simulation and online experimentation
  6. Failure modes, monitoring, and rollback plans

Constraints

  • Hard SLA: 98% of jobs must be assigned within 2 seconds of order creation
  • Driver app location updates arrive every 3-5 seconds and can be noisy or missing
  • Traffic conditions shift quickly during rush hour; ETA features older than 2 minutes are often stale
  • Some cities require explainable dispatch decisions for regulatory audits
  • Serving cost must stay under $0.003 per dispatch decision
  • The system must degrade gracefully to a rules-based dispatcher if ML services are unavailable

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
Next questions
AgeroDesign Agero Dispatch OptimizationHardAgeroDesign Agero Dispatch Decision ServiceHardUber DriversReal-Time Dispatch OptimizationHard