Design a Ride Service Like Uber, OLA

ola uber

What is Ride Service?

Ride service like OLA and UBER is a platform where rider and driver both can register and rider can avail drive service provided by driver.

Functional Requirement

  • Ride Request
    • A rider must be able to create a ride request by specifying a pickup (source) and drop-off (destination) location.
  • Fare Estimation
    • The system shall calculate and display an estimated fare for the requested trip before the rider confirms.
  • Driver Onboarding & Status
    • Drivers can register on the platform, publish their real-time location, and set their availability status for accepting rides.
  • Request Broadcast
    • After the rider confirms payment (or payment intent), the ride request shall be broadcast to all available drivers within a specified nearby radius.
  • Driver Acceptance & Navigation
    • A driver shall be able to accept the request and navigate to the rider’s pickup location.
  • OTP Confirmation to Start Trip
    • The rider can verify the correct driver by providing an OTP (one-time password); the trip shall commence only after successful OTP confirmation.
  • Trip Completion & Final Fare
    • On trip completion the system shall calculate the final fare and present it to the rider for payment.
  • End-to-End Tracking & Monitoring
    • The system shall track and log the entire lifecycle of the trip (request → acceptance → pickup → en route → completed) for monitoring, analytics, and dispute resolution.

Non Functional Requirement

  • Availability : System should be highly scalable
  • Scalable : As an when more drivers and riders added system should be able to scale adaptively
  • Consistency : Since must be highly consistent as well
  • Reliability : Fast and error free service needed

Storage & Bandwidth Estimation

India Market (December 2024) 

  • Uber: 840,000 daily trips
  • Ola: 460,000 daily trips

Global Context (2024-2025) 

  • Uber: 180 million monthly active users

For design as we are planning for future, Lets assume 100 million rider and 5 million driver available on platform

Storage Estimation

  • Lets assume 1 Kb of data need to save for Rider and Driver both inclusing name, id, email, driver licence no and others meta data
  • Rider data = 100 Million * 1 KB = 100 GB
  • Driver data = 5 Million * 1 KB = 5 GB
  • Driver location metadata = 56 Byte * 5 Million = 350 Mb
  • Trip Metadata = 1 Kb * 5 Million Driver * 20 trip /day = 100 GB
  • Total = 210 GB * 365 = 8 TB

Bandwidth estimation

  • Trip per sec = 100 Mil /86400 = 115 per second
  • 115 * 1Kb * 8 = 8 MBps
  • Driver req per 5 sec for location update = 1 M * 56 B *8 = 450 Kbps

Number of servers estimation

  • 105 Million Req minimum /s on peak time
  • Server needec – 105 M /64 K = 16 *105 = 1.6 K Server

API Design

/requestRide(riderID, lat, long, destLat, destLong, typeOfVehicle)

/showETA(rider_lat, rider_lng, destination_lat, destination_lng, ride_type)

/findNearbyDrivers(riderID, lat, long)

/confirmPickup(driverID, riderID, timestamp)

/showTripUpdates(tripID, riderID, driverID, driverlat, driverlong, time_elapsed, time_remaining)

/endTrip(tripID, riderID, driverID, time_elapsed, lat, long)

High Level Design

Building blocks we will use

Deep Dive

Evaluation

Conclusion

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top