Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Introduction to System Design  ›  Lesson

How to Approach a Design

How to approach System Design? 12 minApproach any design in a fixed order: clarify requirements, estimate the numbers, sketch a high-level design, deepen the risky parts, then state the trade-offs.

How to Approach a Design

Someone says "design a link shortener" and the blank whiteboard stares back. Beginners start drawing boxes. Experienced designers start asking questions, because the right boxes depend on answers you do not have yet.

The rule

Ask, count, sketch, deepen, weigh — never boxes first.

Five steps, always in this order:

  1. Ask — pin down requirements. Functional: what must it do? (Create a short link, redirect a click, maybe show click counts.) Non-functional: how well? (How many users, how fast, how available, how long do links live?)
  2. Count — a back-of-the-envelope estimate of load and storage. Rough is fine; you want the order of magnitude.
  3. Sketch — a high-level design that meets the functional needs: the main boxes and arrows.
  4. Deepen — pick the parts the numbers say are risky and design them in detail.
  5. Weigh — say what each choice costs. Every design gives something up.

A handy number for step 2: a month has about 2.5 million seconds (30 × 24 × 3,600 = 2,592,000).

The shortcut

Turn every requirement into a number per second, then look at the ratio of reads to writes. The ratio tells you which path deserves the attention.

Counting for HopStep 1 of 5
  1. Ask

    Hop expects 100 million new links a month. Each link is clicked about 100 times.

The trap is skipping Ask. "Design a shortener" could mean a hobby tool or a global service; the same boxes cannot serve both. Two minutes of questions saves an hour of designing the wrong thing.

Drills

Answer fast — trust the rule.

quick drill

What is the first step when asked to design a system?

quick drill

Which of these is a non-functional requirement for Hop?

quick drill

About how many writes per second is 25 million new links per month?

quick drill

Hop serves 4,000 reads and 40 writes per second. Where should design effort go first?

Remember

  • Ask, count, sketch, deepen, weigh — never boxes first.
  • Shortcut: turn requirements into per-second numbers; a month is about 2.5 million seconds.
  • Trap: designing before you know whether it is a hobby tool or a global service.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainEstimate Hop's traffic

Hop expects 50 million new short links a month, and each link is clicked 100 times on average. Estimate writes per second and reads per second (use about 2.5 million seconds in a month), and explain what the ratio tells you about where Hop's design effort should go.