India’s Leading Domain & Web Hosting Provider
Ride-hailing app rebalances driver supply every 30 seconds across 2,400 city zones
Ride-hailing platform, cabs and autos, 7 cities, about 9 lakh rides a day · Google Cloud Mumbai and Delhi · 10 weeks
As-is situation
Driver locations and ride requests streamed into BigQuery, and a scheduled query computed supply and demand per zone every 10 minutes. Incentives to move drivers toward under-supplied zones were set by city teams using that view. During evening peaks and rain, demand in some zones jumped 4x within minutes, so incentives arrived after riders had given up. Ride requests ending with no driver assigned reached 23% in peak hours in two cities. The scheduled query also cost more each month as refresh frequency was pushed higher.
- 10-minute-old supply and demand view during fast-moving peaks
- No-driver-found rate of 23% in evening peaks in two cities
- Scheduled-query cost doubled after refresh was shortened from 30 to 10 minutes
Approach, tools and architecture
NTSPL built a Dataflow streaming pipeline reading driver pings and ride requests from Pub/Sub, mapping them to H3 hexagons grouped into 2,400 zones, and computing 2-minute sliding supply-demand ratios every 30 seconds with event-time watermarks of 45 seconds. Results are written to Bigtable for the incentive API and to BigQuery for history. When a zone's ratio falls below 0.6 for two consecutive windows, the incentive service pushes nudges to nearby idle drivers, capped per driver per hour. The 10-minute scheduled query was retired.
Implementation approach
Measured results
Operational improvements
- City teams monitor zones instead of setting incentives by hand
- Rain-triggered peaks now show up within one minute of the first request spike
Cost considerations
Dataflow streaming engine runs 6-14 workers depending on load, and Bigtable uses a 3-node cluster. Together they cost less than the BigQuery scheduled queries they replaced, while BigQuery storage of history is unchanged. Bigtable nodes autoscale for weekend peaks.
Return on investment
Nine points fewer failed peak requests add roughly 38,000 completed rides a day across two cities, worth about INR 1.4 crore a month in gross bookings. Lower incentive cost per ride also cut incentive spend; the INR 46 lakh build paid back within weeks.