🎓 A1Learner
🔍
0 of 47 lessons completed

A System Design Walkthrough

A system design walkthrough is a full pass through the interview framework on one small design. It moves in order from clarifying to trade-offs, with each step building on the last.

Clarify, then estimate

Two clarifying questions narrow the design to shared notes. The estimate below uses working assumptions only.

questions = ["Who shares notes?", "Must sharing work at once for many readers?"]
for question in questions:
    print("ask:", question)
users = 5000
notes_each = 2
print("notes:", users * notes_each)

Fix the API and the record

The API names the operations for the narrowed design. The record holds one shared note.

print("POST /notes creates a note")
print("GET /notes/9 reads one note")
record = ["id", "owner", "body", "shared_with"]
for field in record:
    print("field:", field)

Scale, then name the trade-off

Scaling answers the growth question for this small design. The trade-off states what the chosen move costs.

decisions = ["cache popular notes for fast reads", "accept stale reads for a short time"]
for decision in decisions:
    print("-", decision)

Example

steps = ["clarify", "estimate", "api", "data model", "scale", "trade-offs"]
for i, step in enumerate(steps, 1):
    print(i, step)
print("design: shared notes, working assumptions only")

Key points

  • Walkthrough: one design carried end to end through every framework step.
  • Clarify: ask what the system must do and what it can leave out.
  • Estimate: turn working assumptions into small counts of users, records, and requests.
  • Use the API and data model step to fix operations and record fields before scaling.
  • The existing System Design courses are prerequisites for this lesson, and this walkthrough teaches the interview framework only.

The program prints the six framework steps in order. Each step of the walkthrough fed the next one. The closing line restates that the numbers were working assumptions, not facts about a real company.

Note

frame every number as a working assumption for the interview, never as a fact about a real company.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Python Playground

Exercise

In a design walkthrough, which order follows the interview framework?