Lesson 14 of 14
❮Prev Exam ❯

MSD-101 · Interview mastery

Mock interview: design the taxi app in 45 minutes

⏱ 15 min 🎮 Hands-on ☁ Azure

14of 14

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    ⚡ 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.

    Local databaseSQLite (or Realm / Isar) holds the active trip, recent places and the outbox.
    Outbox and sync managerSaves every command with its idempotency key first, sends it, retries with backoff until the server confirms.
    Realtime clientOne WebSocket. Reconnects with jitter, and after every reconnect re-reads the trip with GET /trips/{id}.
    Location managerChanges GPS accuracy and interval by state: idle 30 s, going to pickup 4 s, background on trip 4–10 s.
    Secure token storeAccess and refresh tokens in Keychain (iOS) or Keystore-backed storage (Android). One place refreshes them.
    Trip state machineThe screen shows whatever state the server says. The phone never decides that a trip is “matched”.
    1. 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.
    2. The design ideaScope, size, sketch, deepen, break, trade.
    3. 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.

    MinutePhaseSay this
    0–5Requirements“Let me confirm scope and numbers first.”
    5–10Estimates“250k events/s means location is a stream.”
    10–20High-level design“Two paths: a lossy stream and exactly-once commands.”
    20–35Deep dives“The hardest part is matching races; here is the lock.”
    35–45Failures + trade-offs“If a region fails, Front Door moves traffic; here is the cost.”

    🎬 Watch the flow🤔 Choose a design🧪 Design lab

    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.

    Ready for more?The full lesson adds the technical explanation, interview questions and quick revision.

    Test yourself

    5 questions. Get 4 right and this lesson is marked complete.

    1. 1. What should the first five minutes cover?
    2. 2. Why estimate events per second early?
    3. 3. Which is a red flag in a design interview?
    4. 4. You have 15 minutes for deep dives. What do you pick?
    5. 5. The interviewer asks about a region outage. A strong answer mentions…

    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