What Is System Design?
System Design · Foundations · Basics · 12 min
How big apps are built, and the 7-step framework for every interview.
A single tap travels like a parcel through a chain of offices: a phone book (DNS), a local post office (CDN), a sorting desk (load balancer), a worker (app server), a shelf of ready answers (cache) and the warehouse (database). Every office exists because a number said we needed it.
The idea in everyday words
Building software for 10 users is like cooking dinner for your family. Building for 100 million users is like running McDonald's worldwide: you need many kitchens (servers), a host who sends customers to free tables (load balancer), pre-made fries (cache), and a warehouse (database). System design is planning that restaurant chain.
The simplest system
Client (your phone/browser) → sends a request over the internet → Server (a computer running code) → reads/writes a Database → sends a response back.
Everything else (caches, queues, CDNs) is added only when this simple setup gets too slow or breaks.
The 7-step interview framework
The same 7 steps are used in the Playbook and in every walkthrough on this site. Rough timings for a 45-minute interview:
- Requirements (about 5 min): what must it do (functional)? How fast, how available, how durable (non-functional)?
- Estimates (3-5 min): users, requests per second, storage, bandwidth. Read-heavy or write-heavy?
- API (3-5 min): e.g.
POST /tweet,GET /feed?cursor=... - Data model (about 5 min): entities, keys and access patterns, then SQL vs NoSQL
- High-level design (about 10 min): boxes and arrows; walk one request through them
- Deep dives (10-15 min): the hardest parts: scaling the database, caching, hot keys, consistency, failures
- Wrap-up (2-3 min): bottlenecks, single points of failure, monitoring, cost, and what you would do next
Back-of-the-envelope math
1 day ≈ 86,400 s (round to 100,000). 10 million daily users × 10 actions = 100M requests/day ÷ 100,000 ≈ 1,000 requests/second. Peak is usually 2–3× average.
Step by step
- Client:
You tap 'Like' on your phone.
- DNS:
The app looks up api.app.com → gets a server IP.
- Server:
Server checks you are logged in, runs code.
- Database:
Server saves the like in the database.
- Response:
Server replies 200 OK → heart turns red.
Code example
# Quick estimate calculator
daily_users = 10_000_000
actions_per_user = 10
seconds_per_day = 86_400
avg_qps = daily_users * actions_per_user / seconds_per_day
peak_qps = avg_qps * 3
print("average QPS:", round(avg_qps))
print("peak QPS:", round(peak_qps))Interview tips
Spend the first 5 minutes ONLY on requirements and estimates.
Drive the conversation: 'I'll start with a simple design, then scale it.'
Talk about failure: 'What if this server dies?'
Challenge: QPS Estimator
Write estimate_qps(daily_users, actions_per_user) that returns the average requests per second, using 86400 seconds per day, rounded to the nearest whole number.
Example: estimate_qps(8640000, 10) → 1000
Solve it in the browser with tests, hints and an AI coach.
Practice problems
- AWS Well-Architected Framework
- AWS Architecture Center (reference architectures)
- Design Twitter (LeetCode) (Medium)