System Design Notes
Don’t forget to get your copy of Designing Data Intensive Applications the single most important book to read for system design interview prep!

Uber/ Grab/ Lyft Design

With a few taps on the phone, you can make a ride available at your doorstep to take you wherever you want. This is possible with a ride-sharing service such as Uber or Grab. How does such a service handle each ride request? Moreover, how does it scale the service to millions of users. Designing Uber (or Grab or Lyft) is a common question you can encounter in the system design round in interviews. In this post you'll learn how to design a ride-sharing app.

What Is A Ride-Sharing App?

Each of these apps, including Uber, Grab, Lyft and Ola, have their own set of features. Grab and Uber, for instance, offers food deliveries in addition to transportation. Lyft also guides you on the shortest bus routes and helps you connect to the nearest scooters and bikes besides arranging a taxi service for you. With such differences in the apps, it's important to establish what a basic ride-sharing system offers.

A ride-sharing app allows riders to book a vehicle with a driver to take them to the desired destination. The drivers and customers can view each other's locations and communicate via the app from the time the request is made till ride completion.

What Are The Requirements Of Uber?

How to design Uber is a broad question. For a 40-minutes interview, you'll need to list down a few core features and design the system around them.

Basic features of a ride-sharing app include:

  1. Riders can view nearby drivers.
  2. Riders can request a ride.
  3. Riders can view the driver's ETA.
  4. Once a ride is accepted, the rider and driver can view each other's location and communicate until trip completion.

The Need For Service-Oriented Architecture

Uber gets over 1 million active customers and 500k active drivers each day. With a number of different components to handle and the need to scale the system to millions of active riders and drivers, Uber switched from monolithic architecture to a service-oriented architecture in 2014. Each of the microservices operate independently and combine into one big system. Since the evolution of the system, Uber has added additional services too. Other than delivering taxis, it also handles food deliveries, and cargo.

Click here to continue reading this lesson on Medium.