</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 3: A Million Rides in Mid-Air - Scale Estimation & Workload Analysis

Executive Summary: This section derives every number the design will lean on from two inputs: 30 million events a day and a 20-minute mean duration. Little's Law turns those into about a million rides in progress at peak; the same arithmetic gives 1,750 writes per second, 6,000 reads per second, 20 GB of new data a day, and a formula for how many events any query returns. The verdict is the opposite of what most candidates expect: writes are small, the open set fits in memory, and the real enemy is the size of an answer.

"Before you design anything: how big is this?"

Most candidates reach for QPS first. Here the thing stored is an interval, and intervals pile up in the present, so the candidate starts with how many are alive at once.

Two Inputs, Stated Out Loud

Candidate: "I'll plan on 30 million rides a day. Uber reports roughly that across products, so it's a sane first tenant. Mean ride, pickup to drop-off, 20 minutes, hard-capped at 12 hours; anything open longer is broken. Peak is 2.5× average, about 10,000 cities, the biggest market around 4% of volume, and a record of about 200 bytes. Correct any of those and I'll redo the chain."

Interviewer: "Fine. Go."

Everything below comes from those inputs.

Estimation chain from 30M events/day: peak start rate of about 52,083/min, Little's Law with a 20-minute mean duration giving about 1.04M open rides and a 0.3 GB in-memory open set, ingest of 694/s average and 1,750/s peak, storage of 20 GB/day reaching 5.4 TB at RF 3, and result size per query N = lambda(W + D)

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.