Dataford
Interview Guides
Upgrade
All questions/ML System Design/Design Real-Time Dispatch Optimization

Design Real-Time Dispatch Optimization

Hard
ML System Design
ML RankingRetrievalFeature Store

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

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
Your answer
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.
0 wordstarget ~200
Up next
AgeroDesign Agero Dispatch OptimizationHardAgeroDesign Agero Dispatch Decision ServiceHardFoursquareDesign Real-Time Location TrackingHard
Next question