Design a Multi-Vehicle Request Flow

Medium45 min
1 / 30
System design answer

Design a Multi-Vehicle Request Flow

Medium45 min30 sections
understanding•7 min read

Problem Statement: One Booking, Several Vehicles

Why a group ride is a different system from a single ride, and what one booking must guarantee to the organizer and to every rider.

Problem statement

Most ride-hailing designs assume one rider, one request, and one car. A family heading to a wedding, a 14-person team travelling to an offsite, a stadium crowd that must leave together, and a school trip all break that assumption. They need one booking that asks for several vehicles, and the platform must treat those vehicles as one unit of intent while still tracking each car on its own.

The organizer wants one screen that shows every car, one quote, one payment, and one cancel action per car. The riders want their own car to arrive on time. Operations wants a single bad leg to avoid taking down the whole booking, and wants no driver to be double-booked for two seats.

What a multi-vehicle booking must guarantee

  • One booking ID for N legs. Each leg is one vehicle with its own pickup, drop-off, seat count, vehicle class, and driver.
  • Atomic or partial allocation, chosen by the organizer before confirmation. Atomic means every leg gets a driver or no leg does. Partial means the booking proceeds with the legs that were filled, and the rest are retried or refunded.
  • One payer or a split of shares, with every cent of every leg accounted for in a ledger.
  • Live status per leg, plus one combined map that shows all cars.
  • Cancellation of one leg without corrupting the others, with a fee and refund that apply only to that leg.

Why single-ride designs miss this

A single-ride design treats each request as independent. If you run N independent requests you get three failures. The cars arrive at different times because nobody coordinated their ETAs. Two requests can grab the same driver because each allocator saw a different snapshot of supply. And the payment becomes N unrelated charges with no way to split or cancel them together.

Real products around this problem

Uber supports group and business travel. Uber for Business lets a company pay for rides taken by its employees with central billing and per-rider profiles. Uber also offers scheduled rides and split fares, where riders on one trip share the fare. Lyft offers shared rides and business accounts. Grab runs ride-hailing inside a wider super-app across Southeast Asia, and Ola runs shared and outstation rides in India.

Public engineering detail on how these companies allocate several cars for one booking is thin. This answer therefore separates what is publicly described from the design assumptions it depends on. Every number that is not labelled as published is a design assumption.

Key Highlights

  • •A group booking is one aggregate with N legs, not N unrelated ride requests.
  • •The hard parts are atomic driver allocation, coordinated ETAs, split payments, and cancellation of a single leg.
  • •Riders and drivers carry phones, so ingress is ordinary HTTPS and WebSocket API traffic, not IoT telemetry.
  • •Every scale number is either a published figure or an explicit design assumption.
  • •The organizer's choice between atomic and partial allocation decides most of the failure design.
Name the Group as the Unit
Say early that a group booking is one aggregate with N legs. That single decision drives the allocation, payment, and cancellation designs that follow.
Treating Legs as Unrelated Requests
Independent requests look simpler, but they produce duplicate driver assignments, uneven arrival times, and N separate charges that nobody can split or cancel together.

Section Rescue Kit

Buzzwords to use:

Aggregate RootFan-Out Tracking

Safe statements:

  • "Let me treat the group as one aggregate first, because that choice decides how allocation, payment, and cancellation stay consistent."
  • "I will label every number as either a published figure or an assumption, so the design can be checked against the stated inputs."
Design a Multi-Vehicle Request Flow - System Design | WinJob | WinJob