MSD-101 · Interview mastery
Mock interview: design the taxi app in 45 minutes
⏱ 15 min 🎮 Hands-on ☁ Azure ✓ Completed
⚡ The 30-second answer
In a 45-minute interview, spend time like an architect: 5 min requirements, 5 min estimates, 10 min high-level design, 15 min deep dives (location, matching, payments), 5 min failures and trade-offs, 5 min questions. Say your trade-offs out loud; the interviewer is grading your decisions, not your box count.
- A 45-minute timeline
- What to say in each phase
- Common follow-up questions
- Red flags to avoid
Try it
Play with the design before you read about it. Everything runs on this page.
Watch one booking travel through the system. Switch flows with the coloured chips. Tap any box.
Press ▶ Play to watch one booking travel through the system, or tap any box.
GET /trips/{id}.🤔 Drivers move every second and riders want to see them live. How should the phones and the backend talk?
Compare all three side by side
| Approach | Pros | Cons | When to choose |
|---|---|---|---|
| Polling (REST every few seconds) | Simplest to build. Works with any backend and any proxy. | Millions of empty requests, battery drain, and updates are always up to one interval late. | A first version in one city with a few hundred drivers. |
| Push notifications only | Reaches the phone even when the app is in the background. | No ordering, no delivery guarantee, throttled by the OS. Fine for “driver arrived”, useless for a 4-second stream. | Only to wake the app or announce rare events. |
| Hybrid: WebSocket for live, HTTPS for commands, push to wake | Under 1 s updates, one connection per phone, safe retries for anything that costs money. | More moving parts. The app must reconnect and re-sync state after every drop. | Any real-time app at city or global scale. |
✅ Choose the hybrid design. Live data (GPS, “driver is 2 minutes away”) is a stream: lose one point and the next one replaces it. Commands (book, cancel, pay) are the opposite: each must happen exactly once. Mixing them in one channel is the most common design mistake in ride apps.
A rider books tonight for a 6:00 am airport pickup tomorrow. Nobody should hold a socket open all night, and a driver must really turn up.
Which building blocks belong in your design? Pick all that apply.
- Book = command: save SCHEDULED trip, return at once.
- Service Bus fires at pickup − 20 min and starts normal matching.
- Push to rider and driver; from here it is the same live flow.
Same app in a market with cheap 2 GB phones, prepaid data and networks that drop to 2G between buildings.
Which building blocks belong in your design? Pick all that apply.
- The backend barely changes; the phone does the hard work.
- Batch and compress GPS, cache tiles, keep the outbox.
- Design for the worst network, not the office Wi-Fi.
At the airport, drivers wait in a holding area and must be served first-come, first-served, not by distance.
Which building blocks belong in your design? Pick all that apply.
- Same stream, different matching rule.
- Geofence → join a FIFO queue with an idempotent call.
- Offer to the head of the queue; on no answer, move to the next driver.
Two or three riders going the same way share one car and split the fare.
Which building blocks belong in your design? Pick all that apply.
- Model a trip as a car route with several rider legs.
- Match by detour cost, not only distance.
- Each rider gets their own state, ETA and fare.
At 00:05 on 1 January, booking requests jump from 200 to 2,000 a second for 30 minutes.
Which building blocks belong in your design? Pick all that apply.
- Absorb: queue the commands. Scale: autoscale on lag.
- Protect: rate limits, idempotency, honest UI.
- Load-test the 10× day before it happens.
The business adds parcel delivery: no rider in the car, and the driver must take a photo as proof of delivery.
Which building blocks belong in your design? Pick all that apply.
- Same platform, new trip type.
- Files go straight to Blob Storage; the API only stores the link.
- Proof upload uses the outbox, so offline is fine.
- The problemA candidate draws 20 boxes in the first 10 minutes. The interviewer asks “how many drivers?” and the candidate has no idea. The rest of the hour is spent going back.
- The design ideaScope, size, sketch, deepen, break, trade.
- In real lifeInterviewers at large companies use rubrics with lines like “gathered requirements”, “made reasonable estimates”, “identified bottlenecks” and “discussed trade-offs”. The timeline above hits every line.
Start with a question
A candidate draws 20 boxes in the first 10 minutes. The interviewer asks “how many drivers?” and the candidate has no idea. The rest of the hour is spent going back.
Interviews reward a clear process more than a perfect diagram.
Explain it like I'm 10
Building a sandcastle with friends: first agree how big, then draw the outline in the sand, then build the towers one by one, then check the tide.
The technical explanation
0–5 min: requirements. Riders book, see the car, pay; drivers go online, accept, navigate. Ask: which countries? how many drivers? scheduled rides? pooling? Agree targets: match < 10 s, car on map ≤ 5 s old, 99.95% booking.
5–10 min: estimates. 1M drivers × 1 ping / 4 s ≈ 250k events/s; 3M trips a day ≈ 35 bookings/s average, ~5× at peak. Conclusion out loud: location is a stream, booking is a small command API.
10–20 min: high-level design. Two paths: WebSocket → stream → geo index for location; HTTPS → gateway → trip service → database for commands; push only to wake. Map to Azure only if asked or if it helps.
20–35 min: deep dives. Pick two or three: location pipeline, matching race (atomic reservation), payments (idempotency at every hop), trip state (ETag), multi-region. 35–40 min: failures (network drop, killed app, region down, surge). 40–45 min: trade-offs and your questions.
| Minute | Phase | Say this |
|---|---|---|
| 0–5 | Requirements | “Let me confirm scope and numbers first.” |
| 5–10 | Estimates | “250k events/s means location is a stream.” |
| 10–20 | High-level design | “Two paths: a lossy stream and exactly-once commands.” |
| 20–35 | Deep dives | “The hardest part is matching races; here is the lock.” |
| 35–45 | Failures + trade-offs | “If a region fails, Front Door moves traffic; here is the cost.” |
Real-world scenario
Interviewers at large companies use rubrics with lines like “gathered requirements”, “made reasonable estimates”, “identified bottlenecks” and “discussed trade-offs”. The timeline above hits every line.
Test yourself
5 questions. Get 4 right and this lesson is marked complete.
Pass the quiz to complete this lesson.
Take the MSD-101 exam →Questions people ask
How do I prepare for a ride-hailing system design interview?
Practise the 45-minute timeline out loud, know the numbers (events per second, trips per second), and be ready to go deep on location, matching, payments and failures.
Should I name cloud services in a system design interview?
Describe the role first (“a stream”, “an in-memory geo index”). Name services such as Azure Event Hubs or Azure Managed Redis when it adds clarity or the interviewer asks.
What if I do not know the answer to a follow-up question?
Say what you would measure or test to find out, and reason from the numbers you agreed earlier. Interviewers grade the thinking; a confident guess that is wrong scores worse than an honest plan.
Interview questions
How this topic comes up in system design interviews. Answer out loud first, then open the model answer.
intermediate Follow-up: how would you add scheduled rides?
Save the trip as SCHEDULED, schedule a durable message (Service Bus) for pickup minus 20 minutes, then run normal matching; remind rider and driver by push.
advanced Follow-up: how do you keep costs under control at global scale?
Right-size the GPS interval, use autoscale with limits, cache route results per area, keep hot data small with expiries, archive cold data cheaply, and review cost per trip as a metric.
advanced Follow-up: what would you monitor on day one?
Match time p95, booking error rate, stream lag, socket connection count, payment failures and dead-letter count, push delivery failures, and cost per trip.
Quick revision
Remember
- A 45-minute timeline
- What to say in each phase
- Common follow-up questions
- Red flags to avoid
- When you do not know something, say how you would find out (“I would load-test the matcher at 2× peak”). Guessing confidently is a red flag; reasoning openly is a green one.
One line to remember
“Scope, size, sketch, deepen, break, trade.”
Official documentation
- Azure Architecture Center (Microsoft Learn)
- Well-Architected Framework (Microsoft Learn)