CSE Roadmap

Common tier · about 6 hours · 8 parts

Part 3 of 8 · 2 min read

Scripts

Words you can adapt.

These are examples, not lines to memorise. Change them to your own voice.

Opening (30 seconds). "Let me check I understand: the task is a system that does [one sentence]. I will ask a few questions, estimate the scale, draw a first design, and then go deep on the hardest part. Is that fine?"

Scope questions (pick four to six).

  • "Who are the users, and what are the three most important actions?"
  • "How many users and how many a day are active?"
  • "Which features are in scope, and which can I leave out?"
  • "What matters most: low delay, high availability, or strict correctness?"
  • "Is data loss ever acceptable?"
  • "Must it work worldwide, or in one region?"

Write the answers on the board as a list. Then say: "I will assume the following..." and list the assumptions. The interviewer can correct them.

Numbers script. "Assume 50 million users and 10 million active a day. Each does 5 actions a day: 50 million actions a day. Divided by about 100,000 seconds is 500 a second on average, and I will use 5 times that for the peak: 2,500 a second." Round numbers on purpose. Show the formula. Say what the number means for the design: "2,500 a second fits on a few servers, but the storage grows by X, so storage is the main concern."

First design script. "I will start with the simplest design and improve it." Draw: client, load balancer, service, database. Number the steps of the main flow. Say the API in two or three lines: "POST /orders with items and a request id returns an order id."

Transition to the deep dive. "The weak point of this design is [X], because [number]. I will fix it with [Y]." If the interviewer suggests a different area, follow it gladly.

Words to avoid. "Obviously", "just", and "it depends" with no follow-up. Replace the last with "It depends on A. If A, I choose X. If not, Y."

A worked example (made up). Prompt: design a ticket booking service. Opening: restate. Questions: 20,000 seats per event, 500,000 users trying at launch, hold time 10 minutes. Numbers: 500,000 users in 1 minute is about 8,300 requests a second at the start, many for the same seats. First design: service, database with a seats table, payment service. Weak point: many users competing for the same rows. Deep dive: a hold with a lease and a waiting room.

Check yourself: 1. What do you do after the scope answers? 2. Why round numbers on purpose? 3. What is the weak-point sentence for?