Ola System Design Interview: Ride-Hailing and Maps at Scale
Ola built its own mapping stack for India from scratch and switched off Google Maps entirely by July 2024, a move its founder said saved around 100 crore rupees a year. Its maps data platform ingests more than 5 million messages a second from a fleet that doubles as a live sensor network across 250-plus cities.
Designing Ola is the ride-hailing problem with an India twist. The core is the same shape as any ride-hailing app: a rider requests a car, the system finds a good nearby driver, both sides track the trip live, and payment settles at the end. What makes Ola distinctive, and what it has actually published, is the mapping layer underneath. Ola built its own maps, routing, and estimated-time-of-arrival stack for Indian roads, because global map providers did not serve India well, and it uses its own vehicle fleet as a rolling sensor network to keep the maps fresh. This walkthrough covers the ride-hailing core as the standard pattern, and goes deep on the Ola Maps stack, which is the part Ola has documented.
Asked at: Commonly asked at Ola, Uber, Rapido, and mobility and mapping teams, and the general form, meaning design a ride-hailing app or design a maps and routing service, shows up at most product companies for SDE2 and SDE3 rounds. The ride-hailing question tests real-time geospatial matching, and the maps angle, which Ola makes concrete, tests routing, estimated time of arrival, and building location infrastructure for a hard market.
Why this question is asked
Ride-hailing is a favorite because it forces real-time geospatial reasoning: matching a rider to a nearby driver in seconds, tracking moving vehicles, and estimating arrival times on real roads. Ola adds a second, less common dimension that it has published in detail: the maps themselves. Most candidates assume a map and routing service exists and move on, but Ola had to build one for India, where address data is inconsistent, rural coverage is thin, and roads change often. Interviewers use Ola to check whether you can design the ride-hailing core, and whether you can reason about the layer under it: how map data is collected and kept fresh, how routes and arrival times are computed, and why a company would build this itself. It rewards candidates who can separate the standard ride-hailing pattern from the genuinely hard, India-specific mapping work.
Requirements
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
Functional requirements
- Rider enters a pickup and drop location and gets a fare estimate and estimated time of arrival before booking
- System matches the request to a suitable nearby driver and both sides see the match
- Rider tracks the assigned driver approaching in real time on a map, then tracks the trip to the destination
- Turn-by-turn navigation and routing for the driver, including rerouting around closures and traffic
- Trip lifecycle: requested, driver assigned, arriving, in progress, completed, or cancelled
- Fare calculation at trip end, with payment by cash, UPI, card, or wallet
- Support for multiple vehicle types, including cars, autos, and bikes
- Map features such as place search and geocoding an address to coordinates
Non-functional requirements
- Match a request to a driver within a few seconds, and answer nearby-driver queries in low tens of milliseconds
- Live location updates for the assigned driver and the trip, refreshed every few seconds and rendered smoothly
- Routes and estimated arrival times that reflect real Indian road conditions, traffic, and closures
- Map data that stays fresh as roads and conditions change frequently
- High availability in the request and tracking path, since a failed match or a frozen map is a lost trip
- Scale across 250-plus cities with very different road quality and data availability
- Cost efficiency in the mapping layer, which was a direct reason Ola built its own
Back-of-envelope scale estimates
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Cities
250+ cities
Ola operates across more than 250 cities in India. This drives the size of the map data, the per-city dispatch, and the range of road conditions the system must handle.
Maps data ingest
5M+ messages/second
Ola states its maps data platform ingests more than 5 million messages a second from sensors and vehicle telemetry into a petabyte-scale lakehouse. This is the live feed that keeps the maps current.
Map data contributions
5.43M OpenStreetMap edits/year
Ola reported contributing 5.43 million edits to OpenStreetMap in a year, an indication of how much map correction its fleet-driven data enables.
Cost of third-party maps removed
~100 crore rupees/year
Ola's founder said the company was spending around 100 crore rupees a year on external mapping and eliminated it by building Ola Maps, reaching zero reliance on outside providers by July 2024. Cost was an explicit driver of the design.
Ride volume
illustrative, ~millions/day
Ola does not publish current ride volume or peak requests per second. Reported figures are dated, such as around 1.5 million rides a day in 2018. For back-of-envelope math, assume an order of a few million rides a day and derive the rest, and be clear in an interview that this is an assumption, not a published figure.
Developer map usage
5M free API calls/month tier
Ola Maps is offered to developers with a free tier of up to 5 million API calls a month, positioned as a lower-cost India-first alternative to global map APIs. It shows the maps are a productized platform, not just an internal tool.
High-level architecture
Design Ola in two layers: the ride-hailing core, which is the standard pattern, and the maps stack underneath, which is the part Ola has actually built and documented. Being clear about which is which is the honest way to answer, because Ola has not published its dispatch or surge internals, but it has published its maps work in detail. The ride-hailing core is the familiar flow. A rider opens the app, and the system needs to answer which drivers are near the pickup, which is a geospatial proximity query. The standard way to do this, and the pattern to describe since Ola has not published its specific approach, is to keep every online driver's live location in an in-memory geo index keyed by a spatial cell, such as a geohash or H3 grid, so finding nearby drivers is cheap. A matching service then picks a good driver for the request, considering distance, direction, and driver state, and offers the trip. Once matched, the driver's location streams to the rider, the trip runs through a state machine from assigned to arriving to in progress to completed, and at the end the fare is computed and payment settles through cash, UPI, card, or wallet. Trip, driver, and payment data that must be correct lives in a transactional store, while the high-volume live locations live in memory and are never written to the durable store at full fidelity. The maps stack is where Ola is distinctive, and all of the following is Ola-stated. Ola built its own maps because global providers did not prioritize India, which left it unable to handle inconsistent address data, thin rural coverage, and roads that change often. The data platform centrally ingests more than 5 million messages a second from anonymized GPS pings on two- and four-wheelers, from its own camera-equipped electric-scooter fleet acting as a rolling sensor network, and from open and government sources, then normalizes and anonymizes it into a petabyte-scale lakehouse that feeds map operations and model training. On top of this data sit the map services. Routing is built on the open-source OSRM engine with a custom algorithm, using live vehicle-ping speeds, road-closure detection from government and social sources, and neural time-series models for estimated time of arrival. Place search and geocoding are AI-first, using named-entity models and learning-to-rank on top of the open-source Pelias search engine, which matters because Indian addresses are messy. Map tiles are rendered server-side with MapLibre. A small number of skilled human editors correct what the AI pipeline flags. Ola reported concrete results from this stack, including lower pricing deviations, fewer cancellations, and better pickup accuracy.
In a real interview, sketch this on the whiteboard before diving into any single box.
Core components
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
Ride request and matching service
Takes a rider's request and finds a suitable nearby driver. It queries the live driver-location index for candidates and picks one based on distance, direction, and availability. Ola has not published its specific matching algorithm, so this is described as the standard ride-hailing pattern rather than an Ola-stated internal.
Driver location index
An in-memory store of every online driver's live position, keyed by a spatial cell such as a geohash or H3 grid, so nearby-driver queries are fast. It takes a stream of frequent location updates and feeds both matching and live tracking. This is the general ride-hailing approach; the durable trip record is kept separately.
Trip service and state machine
Owns the trip lifecycle from requested to driver assigned to arriving to in progress to completed or cancelled, and computes the fare at the end. This is the transactional core, where trip and payment records must be correct, so it uses a strongly consistent store.
Live tracking
Streams the assigned driver's position to the rider and the trip's progress, refreshed every few seconds. Ola has published front-end work on rendering this smoothly, including polling on a few-second interval and animation techniques that cut unnecessary map re-panning and held a high frame rate on modest hardware.
Ola Maps data platform
Ola's own map data pipeline. It centrally ingests more than 5 million messages a second from vehicle GPS, its camera-equipped electric-scooter fleet, and open and government sources, then normalizes and anonymizes the data into a petabyte-scale lakehouse that feeds map operations and model training. This is what keeps the maps fresh for Indian roads.
Routing and ETA engine
Built on the open-source OSRM engine with a custom algorithm. It uses live vehicle-ping speeds, detects road closures from government and social sources, computes estimated time of arrival with neural time-series models, and optimizes multi-stop routes. This is the part of the maps stack that a ride depends on most directly.
Places, search, and geocoding
Turns messy Indian addresses into coordinates and powers place search. Ola built this AI-first, with named-entity recognition and learning-to-rank models on top of the open-source Pelias search engine, because inconsistent and non-standard addresses make plain string matching unreliable.
Tile rendering and human-in-the-loop editing
Map tiles are generated server-side with MapLibre using local styles and fonts. A small team of skilled human data editors reviews and corrects what the automated pipeline flags, so the map stays accurate where AI alone is not enough.
Data model
Pick the right store per table. Justify each choice with the access pattern, not by reflex.
driversdriver_id (PK)vehicle_type (car|auto|bike)is_onlinecurrent_city_idratingstatusThe driver profile and current state. Live position is not stored here; it lives in the in-memory location index. Status and city scope the matching candidate pool.
driver_locationsdriver_id (PK)latlngheadinggeo_cellupdated_atIn-memory only, keyed by spatial cell so proximity queries are cheap. Overwritten every few seconds. The highest-volume data in the ride path and never written to the durable store at full fidelity.
tripstrip_id (PK)rider_iddriver_idpickupdropstatefare_paiseroute_refrequested_atcompleted_atThe transactional core of a ride. Strongly consistent. State moves through requested, assigned, arriving, in progress, completed, and cancelled. route_ref links to the computed route.
paymentspayment_id (PK)trip_id (FK)amount_paisemethod (cash|upi|card|wallet)statusidempotency_keyFare settlement per trip. Idempotent so a retry never double-charges. Cash is common in this market and reconciles at trip end rather than a pre-capture.
map_featuresfeature_id (PK)type (road|place|poi)geometryattributes (jsonb)sourceupdated_atThe map itself: roads, places, and points of interest, derived in the Ola Maps lakehouse from fleet telemetry and open and government sources. Continuously updated as conditions change.
road_speedssegment_id (PK)speed_estimateclosure_flagupdated_atLive per-segment speed estimates and closure flags, derived from vehicle pings and external sources. Feeds routing and the estimated-time-of-arrival model.
Deep dives
These are the conversations the interviewer is steering you toward. Practice each one until you can talk through it without notes.
Matching a rider to a nearby driver (the standard pattern)
The first question a ride-hailing system answers is which drivers are near the pickup, and it has to answer it in milliseconds while drivers are constantly moving. The general approach, which is what to describe since Ola has not published its own, is to keep every online driver's live position in an in-memory geo index keyed by a spatial cell such as a geohash or H3 grid. To find candidates, you compute the pickup's cell and its neighbors, pull the drivers in those cells, and rank them by real road distance and direction, not straight-line distance, because a divider or a one-way street changes who can actually reach the rider quickly. A matching service then offers the trip to a good candidate, and if declined or timed out, moves to the next. The live positions are kept only in memory because writing every few-second ping to a durable database would overwhelm it and nothing reads historical pings in real time. This is the geospatial core the interviewer wants, and it is honest to flag it as the industry pattern rather than an Ola-specific design.
Why Ola built its own maps for India
This is the distinctive, Ola-published part of the problem. Ola stated that its reliance on western mapping providers, for whom India was not a priority, limited what it could build, so it started building its own maps in 2021 and reached zero reliance on outside providers by July 2024. The reasons are specific to India: address data is inconsistent and non-standard, rural coverage is thin, the road network changes often, and traffic and road quality vary enormously. There was also a direct cost reason, since the founder said the company was spending around 100 crore rupees a year on external mapping. The lesson for an interview is that a piece most designs treat as a given, the map and routing service, can itself be the hard system to build, and that the decision to build it rested on both capability, serving India properly, and cost.
The maps data platform and the fleet as a sensor network
Fresh maps need fresh data, and Ola's advantage is that its own vehicles produce it. Ola stated that its data platform centrally ingests more than 5 million messages a second from anonymized GPS pings on two- and four-wheelers, from its camera-equipped electric-scooter fleet acting as a rolling sensor network, and from open and government sources. The raw feed is normalized and anonymized into a petabyte-scale lakehouse, and declarative pipelines turn it into map features, model training data, and analytics. This is a vertically integrated advantage: because Ola runs the fleet, it gets a continuous stream of real-world road data that a pure software mapping company would have to buy or crowdsource. Ola reported contributing millions of OpenStreetMap edits in a year off the back of this data. The design point is that the mapping problem is really a large-scale data ingestion and processing problem before it is a rendering problem.
Routing and estimated time of arrival on real roads
A route and an arrival time are what a rider and driver actually depend on. Ola built its routing on the open-source OSRM engine with a custom algorithm, and fed it live signals: speed estimates derived from current vehicle pings, road-closure detection pulled from government sources and social media, and neural time-series models for the estimated time of arrival, plus multi-stop optimization. The reason this is hard in India is that static maps go stale fast, a road that was open yesterday can be dug up today, and average speeds swing widely, so an arrival estimate built only on distance and speed limits is wrong. Grounding routing and estimates in live data from the fleet is what makes them usable, and Ola reported measurable gains from this, including better pickup accuracy and fewer cancellations.
Search and geocoding for messy Indian addresses
Turning what a person types into a precise location is unusually hard in India, where addresses are inconsistent, informal, and often reference landmarks rather than street numbers. Ola built its place search and geocoding AI-first, using named-entity recognition to pull structure out of a freeform address and learning-to-rank models to order candidate matches, on top of the open-source Pelias search engine for autocomplete. The point for an interview is that geocoding is not a simple string lookup here; it is a language and ranking problem, and treating it as one is why the search returns the right place from an ambiguous query. This is the kind of India-specific problem that a global provider optimized for well-structured addresses handles poorly.
Keeping the ride-hailing core and the maps platform separate
A useful design decision is that the live ride path and the maps data platform are different systems with different needs. The ride path is latency-critical and transactional: match in seconds, track every few seconds, keep the trip and payment correct. The maps platform is a large-scale data and machine-learning pipeline: ingest millions of messages a second, process petabytes, train models, and publish updated map features and tiles on its own cadence. Keeping them separate means the heavy data processing never slows down a live ride, and the ride services consume the maps through stable APIs, routing, ETA, geocoding, and tiles, rather than depending on the pipeline directly. Ola even exposes these map APIs to outside developers with a free tier, which only works because the maps are a clean, productized platform rather than tangled into the ride path.
Trade-offs to discuss
Every senior interviewer expects you to surface at least 3 of these. Pick the decisions, state the alternatives, and justify your choice.
Building maps in-house versus using a third-party provider
Using a provider like a global maps API is far less work and is the right choice for most companies. Ola built its own because providers did not serve India well enough and because it was spending around 100 crore rupees a year on them. Building in-house gave control over India-specific quality and removed the cost, but it required years of work, a large data platform, and machine-learning investment. It only makes sense at Ola's scale and with a fleet that supplies the data, and it is a clear build-versus-buy case study.
Using the vehicle fleet as a sensor network versus buying map data
Buying or licensing map data is simpler, but it goes stale and does not capture fast-changing local conditions. Using the fleet, including camera-equipped scooters, as a rolling sensor network gives a continuous, fresh feed of real road data, which is a genuine advantage of being a mobility company. The cost is building the ingestion and processing to handle more than 5 million messages a second and the privacy engineering to anonymize it, accepted because fresh, India-specific data is the whole point.
In-memory geo index for driver locations versus a database
Writing every driver's few-second location ping to a durable database would overwhelm it, and nothing reads historical pings in real time. Keeping live positions in an in-memory index keyed by spatial cell gives cheap proximity queries and cheap writes, while the durable store holds only the trip record. The cost is that a node failure loses live positions, but drivers re-ping within seconds, so the index heals itself. This is the standard ride-hailing trade.
AI-first geocoding versus simple string matching
Plain string matching on addresses is easy but fails on the inconsistent, landmark-based addresses common in India. Ola built geocoding with named-entity recognition and learning-to-rank models on top of an open-source search engine, which returns the right place from an ambiguous query far more often. The cost is building and serving machine-learning models on the lookup path, accepted because address quality in the market makes the simple approach unreliable.
Separating the maps data platform from the live ride path
Combining them would be simpler to reason about, but the maps platform's heavy, petabyte-scale processing would then risk slowing down latency-critical ride requests. Keeping them separate, with the ride services consuming stable map APIs, isolates the two so the data pipeline can run at its own cadence. The cost is maintaining the API boundary and some duplication, accepted because it protects the live experience and let Ola productize the maps for outside developers.
How Ola actually does it
The maps portion of this is documented directly by Ola on its engineering blog and confirmed in press, while the ride-hailing dispatch internals are not published by Ola and are described here as the standard industry pattern. Ola stated that it built its own maps because western providers did not prioritize India, started in 2021, and reached zero reliance on outside providers by July 2024, with its founder saying this removed around 100 crore rupees a year of mapping cost. Ola stated that its maps data platform ingests more than 5 million messages a second from anonymized vehicle GPS, its camera-equipped electric-scooter fleet, and open and government sources, into a petabyte-scale lakehouse, and that it contributed 5.43 million OpenStreetMap edits in a year. It stated that routing is built on the open-source OSRM engine with a custom algorithm, using live speed estimates, road-closure detection, and neural time-series models for estimated time of arrival, that place search and geocoding use named-entity and learning-to-rank models on top of the open-source Pelias engine, that tiles are rendered with MapLibre, and that a small team of human editors corrects what the AI flags, with reported gains in pricing accuracy, cancellations, and pickup accuracy. Ola Maps is offered to developers with a free tier of up to 5 million API calls a month. Ola acquired the geospatial firm GeoSpoc in 2021 as a foundation for this work, and the maps are delivered through Krutrim, its cloud and AI arm. Three accuracy notes for the interview. First, Ola does not publish current ride volume or peak requests per second, and older figures such as around 1.5 million rides a day are from 2018, so treat any ride-count math as an assumption you state, not a fact. Second, Ola has not published its dispatch, matching, or surge algorithms, so present those as the general ride-hailing pattern, not as how Ola specifically does it. Third, the front-end live-tracking details, such as polling every few seconds, come from an older Ola post that predates Ola Maps.
Sources
- Ola Maps engineering blog, Navigating India: the journey of Ola Maps, covering OSRM routing, Pelias geocoding, MapLibre tiles, and the 5 million messages per second data platform
- Ola Maps developer platform: the live Tiles, Routing, Places, and Navigation APIs
- Inc42, A long road for Ola Maps: the GeoSpoc acquisition, three-year build, 100 crore rupee cost, and sensor data
- Business Today, Made for India, priced for India: Krutrim unveils Ola Maps pricing, including the 5 million calls per month free tier
- Ola blog, Ola acquires GeoSpoc: the 2021 geospatial acquisition behind Ola Maps
- Tech at Ola, High-performant real-time tracking on web: the front-end live driver-tracking work
- Entrackr, Ola ride-hailing business FY24 revenue and turning EBITDA positive
Lessons to study before this interview
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
Geospatial Indexing
intermediate / database types storage
WebSockets
intermediate / messaging event systems
Message Queues
intermediate / messaging event systems
Cache-Aside Pattern
foundation / caching strategies
Load Balancing
foundation / core fundamentals
High Availability
advanced / reliability resilience
Rate Limiting for Resilience
advanced / reliability resilience