esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

How to Approach System Design: A Repeatable Step-by-Step Process

Turn a vague product request into a reasonable design by clarifying needs, estimating scale, sketching a simple design, then refining the weak parts.

In short

To approach system design, turn a vague request into a design by clarifying needs, estimating scale, sketching a simple design, then refining the weak parts.

12 min readFree

What you will learn

A friend says, build us a photo app. Where do you start? Experienced designers do not start by drawing boxes. They repeat the same loop each time: clarify what is needed, estimate how big the problem is, sketch a simple design, improve the weak parts, and explain the trade-offs. In this lesson you will learn that loop step by step, then watch it work on a URL shortener from the first question to the final trade-off.

Key words

Functional requirement
Something the system must do, such as letting a user upload a photo.
Non-functional requirement
A quality the system must have, such as fast replies, many users, or being up most of the time.
Assumption
A guess you say out loud so everyone knows what you are working with.
Constraint
A hard limit you must respect, such as a budget, a legal rule, or a launch date.
Back-of-the-envelope estimate
A quick, rough calculation using round numbers, the kind you could do on scrap paper.
High-level design
A simple first picture of the main parts and how data moves between them.
Bottleneck
The one part of a system that slows down or breaks first when more people use it.
Trade-off
A choice that gains one thing and gives up another.

What is the five-step loop?

The loop has five steps. You run them in order the first time, then go back whenever a number or a new fact changes your picture.

  1. 1

    Clarify the requirements

    Write down what the system must do and how well it must do it. State your assumptions and constraints.

  2. 2

    Estimate the scale

    Turn words like huge or fast into users, requests per second, and stored data.

  3. 3

    Sketch the high-level design

    Draw clients, servers, and a data store, then follow one request through them.

  4. 4

    Deep-dive the bottlenecks

    Find the part that will strain first and improve that part, not every box equally.

  5. 5

    Discuss the trade-offs

    For each main choice, name what you gained and what you gave up.

Step 1: Clarify the requirements

Vague requests hide very different systems. Design a photo app could mean a gallery for ten friends or a service used by hundreds of millions of people. Ask questions before you design. Good guides describe this step as turning a vague prompt into a clear, scoped problem, and they warn against guessing silently.

What are functional and non-functional needs?

  • Functional needs

    What the system does. For a photo app: users upload photos, follow friends, and see a feed. Ask about scope so you do not design features nobody asked for.

  • Non-functional needs

    How well it does the job. Ask about scale (how many users), latency (how fast a reply must arrive), and availability (how often the system must be up).

  • Constraints

    Hard limits such as budget, rules about where data may be kept, or the date the product must launch.

Keep these two kinds of need apart. Functional needs tell you which parts must exist. Non-functional needs tell you how strong each part must be. A feed that is slow is still a feed, but it fails the latency need.

Why say your assumptions out loud?

You will never get a complete brief. When something is missing, pick a sensible value and say it: I will assume about 10 million users, and that owners can delete their own photos. Stated assumptions let the other person correct you early, when a fix is cheap. Writing them on the board also shows how you think.

Tip

Confirm your understanding before you draw anything. If you guess wrong in silence, every later step is built on the wrong problem.

Step 2: Estimate the scale

Words like highly scalable do not tell you what to build. Numbers do. A back-of-the-envelope estimate tells you which situation you are in, so your design choices come from numbers instead of guesses.

What is the estimation recipe?

  1. 1

    Lock the assumptions

    Write down daily users, actions per user per day, and roughly how big one item is.

  2. 2

    Turn users into requests per second

    Multiply daily users by actions per day, then divide by the seconds in a day. A day has 86,400 seconds, and for quick mental math people round that to about 100,000.

  3. 3

    Estimate the busy hour

    Traffic is uneven, so plan for peak, not average.

  4. 4

    Split reads and writes

    A read is a request that fetches data. A write saves new data. Count them separately, because a read-heavy system needs a different design from a write-heavy one.

  5. 5

    Estimate storage

    Multiply new items per day by the size of one item, then by the number of years you keep them.

Which rules keep the math honest?

  • Use round numbers

    Round to powers of ten. Guides advise you to aim for the right order of magnitude, meaning the right size, not exact digits.

  • Show your work

    Write each step so someone can change one assumption and see the new answer.

  • Estimate only what changes the design

    If a number will not change your choice, skip it. Look for decision points, such as one server versus many, or data that fits in memory versus data that must sit on disk.

Step 3: Sketch a simple high-level design

Now draw the simplest system that meets the requirements. Start with three kinds of parts. A client is the app or web page the user holds. A server is a program that does the work and sends answers back. A data store is where information is kept so it survives a restart, usually a database. Draw arrows to show the path a request takes.

Do not go deep yet. The goal is to show that every requirement has a place in the picture. Then trace one important request, such as uploading a photo or loading a feed, through the boxes.

Build the first draft

  • Clients

    The phone or browser that sends requests and shows the results.

  • Application servers

    The programs that check each request, apply the rules, and read or write storage.

  • Data store

    The database that keeps users, photos, or links safely over time.

Start with one of each. Add extra parts, such as a cache, only when a number or a requirement shows you need them. A cache is a fast, temporary copy of data kept close to the server, so repeated requests need less work from the database.

Step 4: Deep-dive the bottlenecks

Next, find the part that will strain first. Your numbers point the way. If reads are far more common than writes, the read path is the suspect. If each item is large, storage and network traffic become the suspects. Spend your effort on the bottleneck, not on every box.

Find the first pressure point

  1. 1

    Find the busiest path

    Use the requests per second and the read and write split from the estimate.

  2. 2

    Ask what breaks first

    Will one server keep up at peak? Will the database keep up? Will storage run out within the years you planned for?

  3. 3

    Improve that one part

    Pick one fix, such as a cache, more copies of the data, or moving slow work out of the path a user waits on.

  4. 4

    Check the numbers again

    Does the fix handle the busy hour, not only the average day?

Step 5: Discuss the trade-offs

Every choice has a price. A trade-off is a choice that gains one thing and gives up another. Interviewers look for whether you can weigh options. Guides say the same: a strong answer states the trade-offs you made, and what you would revisit with more time or new facts.

Name the gain and the loss

Use a simple pattern: I chose X over Y because of requirement Z. The cost is W. For example: I chose a cache for redirects because reads are far more common than writes. The cost is extra memory, and a copy may be briefly out of date.

Tip

Point at a requirement, not a preference. Because the system is read-heavy is a strong reason. Because I like this database is a weak one.

Worked example: a URL shortener

A URL shortener turns a long web address into a short one that sends visitors to the original page. We will run the whole loop on this product. Each part below matches one step of the loop.

Clarify the shortener

Ask first. Do links expire? Do we need click counts, which is what analytics means here? How fast must a redirect feel? Suppose the answers are: links may expire, click counts are needed, and redirects must feel instant. Write these down. Expiry, counts, and speed become functional and non-functional needs. Then state assumptions, such as anyone can open a link without logging in.

Estimate the shortener

Assume about 100 million new links a month. Assume each link is read about 100 times for every time it is written, which makes reads far more common than writes. Assume one stored link takes about 500 bytes, and assume a busy hour is 3 times the average. The script below runs these numbers.

Python
# Rough numbers for a URL shortener
links_per_month = 100000000
seconds_per_month = 30 * 24 * 60 * 60
read_to_write_ratio = 100
peak_factor = 3
bytes_per_link = 500

writes_per_second = links_per_month / seconds_per_month
reads_per_second = writes_per_second * read_to_write_ratio
peak_reads_per_second = reads_per_second * peak_factor
storage_gb_per_year = links_per_month * 12 * bytes_per_link // 10**9

print(f'writes per second: {writes_per_second:.1f}')
print(f'reads per second: {reads_per_second:.0f}')
print(f'peak reads per second: {peak_reads_per_second:.0f}')
print(f'storage per year in GB: {storage_gb_per_year}')

Output

writes per second: 38.6
reads per second: 3858
peak reads per second: 11574
storage per year in GB: 600

The result is about 39 new links per second, about 3,858 redirects per second on average, and about 11,574 at the busy hour. Storage is about 600 GB per year before any extra copies. The read number drives the design. Writes are modest, so the redirect path deserves most of the attention.

Sketch the first design

Draw a client, which is the browser a visitor uses. Draw an application server that creates short codes and answers redirect requests. Draw a database that maps each short code to its long address. This is the simplest design that meets the needs. Trace one request: a visitor opens a short link, the server looks up the long address, and the server replies with a redirect to that address.

Zoom in on the redirect path

Redirects are the read-heavy path, so they get the deep dive. Looking up every click in the database works at small scale. At about 11,574 lookups per second at peak, the database is likely to become the bottleneck. A common fix is a cache that keeps recently used links in fast memory.

  • What we gain

    Most redirects are answered from memory. Visitors get a fast reply, and the database does less work.

  • What we give up

    Extra memory and cost. A link that was changed or has just expired may still be served from the cache for a short time.

  • What we must still plan for

    If the cache is empty or fails, traffic falls back to the database, so the database must survive that burst. Counting clicks on every redirect adds writes, so count them in a way that does not slow the redirect.

Tip

Say the trade-off as one sentence: I chose a cache for redirects because reads are about 100 times writes. I give up some freshness and pay for memory.

Common mistakes to avoid

  • Drawing before asking

    Jumping to databases and caches before you know the features and numbers. You may solve the wrong problem very well.

  • Silent assumptions

    Guessing and never saying the guess. Nobody can correct a guess they cannot see.

  • False precision

    Spending minutes on exact digits when a rough size would already decide the design.

  • Hidden trade-offs

    Presenting one choice as if it had no cost. Name the cost every time.

Check yourself

Quick check

A friend asks you to design a photo-sharing app like Instagram. You immediately start drawing databases and caches. What should you have done first, and which two questions would you ask?

Quick check

A social app has 20 million daily users, and each user makes 2 requests a day. About how many requests per second is that on average?

Quick check

Your estimate shows about 39 new links per second and about 3,858 redirects per second on average. Which part should get the deepest design attention first?

Wrap-up: the loop in your own words

Clarify, estimate, sketch, deep-dive, and trade off. Use this order for any product. The order keeps you from solving the wrong problem. To practise, pick an app you use every day and write three functional needs, two non-functional needs, and one rough estimate of its requests per second.

Sources

How is this lesson?

Last updated on 17 November 2026

Learn with me

Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.