Concepts

Dispatch Matching

Select and reserve the best available supply for a demand request under changing location, availability, ETA, fairness, and concurrency constraints.

advanced3 min readUpdated unknownModelingReliabilityOperationsTradeoffs
Candidate SelectionSupply And DemandETA RankingAssignment RacesFairness

Concepts Covered

  • Supply and demand matching
  • Candidate driver selection
  • ETA-based ranking
  • Assignment reservation
  • Driver rejection and timeout
  • Fairness and marketplace effects
  • Race conditions

Definition

Dispatch matching is the process of choosing which available supply should serve a demand request.

In a ride-hailing system, demand is a rider requesting pickup. Supply is the set of drivers who are online, available, close enough, eligible for the trip type, and fresh enough to be trusted.

The matching system answers:

which driver should we offer this trip to right now?

That answer is not only about distance. It may consider ETA, driver state, rider constraints, fairness, cancellation risk, vehicle type, regional rules, and marketplace health.

The Pain That Forces Dispatch Matching

A naive system chooses the nearest driver.

That sounds reasonable until reality arrives:

  • the nearest driver location is stale
  • the nearest driver just accepted another trip
  • the nearest driver is across a one-way street or bridge
  • multiple riders request the same driver at once
  • the driver ignores the request
  • repeatedly choosing nearest drivers creates unfair supply distribution

Dispatch matching exists because the best assignment is a time-sensitive decision under uncertainty, not a simple distance sort.

Mental Model

Think of matching as a short-lived marketplace decision.

The system has:

demand: one rider request
supply: many possible drivers
constraints: eligibility, location freshness, availability, product rules
objective: low pickup ETA, reliable acceptance, fair marketplace behavior

The matcher first narrows candidates, then ranks them, then reserves one or more candidates through a controlled assignment workflow.

How It Works

A simplified flow:

1. Rider requests trip.
2. Matcher finds nearby available drivers through geospatial index.
3. Matcher filters stale, ineligible, or unavailable drivers.
4. Matcher estimates pickup ETA for candidates.
5. Matcher ranks candidates.
6. Assignment service leases a selected driver.
7. Driver receives offer.
8. Driver accepts, rejects, or times out.
9. If needed, matcher tries the next candidate.

The reservation step is crucial. Without it, multiple matching workers can offer the same driver to multiple riders.

Tradeoffs

Nearest driver is simple and explainable, but may be less reliable.

Batch matching can improve marketplace efficiency, but it adds latency and complexity.

Offering to one driver at a time avoids spam and double-booking, but can increase rider wait time if drivers reject or time out.

Offering to multiple drivers can reduce wait time, but it can create confusing driver experiences and race conditions.

Operational Reality

Important signals:

  • match latency
  • candidate count per request
  • driver acceptance rate
  • offer timeout rate
  • reassignment rate
  • stale candidate rate
  • rider cancellation rate
  • double-assignment prevention failures
  • pickup ETA error

Knowledge links

Use these links to understand what to know first, where this idea appears, and what to study next.

Used In Systems

System studies where this idea appears in context.

Related Concepts

Core ideas that connect to this topic.

Related Patterns

Reusable architecture moves built from these ideas.