Stage 2 of 5 · Decide
Find candidates, then ask the road network
A city has tens of thousands of eligible drivers, but a ride request should not call the routing service for all of them. A spatial index needs to reduce the candidate set quickly without hiding a nearby driver just across a cell boundary.
Uber has publicly described using H3, a hierarchical hexagonal grid, for marketplace analysis. It is one possible cell system, not a requirement for this design. See the [Uber H3 engineering post](https://www.uber.com/gb/en/blog/h3/).
System so far· 2 parts
Select a component to see what it is responsible for and which state it owns.
What you need to know
A spatial grid maps a coordinate to a cell. Query the pickup cell and its neighbors, reject unavailable or stale drivers, and expand outward if the candidate set is too small. Cell distance is a coarse filter: lakes, bridges, and one-way roads mean the closest point may not have the shortest pickup time.