Skip to content
TeachTrails
System DesignInterviews

System Design Interview Basics: Framework and Building Blocks

System design for beginners: a 5-step interview framework, back-of-envelope estimates, and the building blocks (load balancer, cache, CDN, queue, sharding).

Sudipta Biswas, AI Engineer

13 min read

Beginner friendly
SYSTEM DESIGN INTERVIEWSDon't jump to boxes. First, READS the question.RRequirementswhat must it do?step 1EEstimateshow big is it?step 2AAPIhow do clients talk to it?step 3DDesignboxes and arrowsstep 4SScalebottlenecks + trade-offsstep 5≈ 5 min · 5 min · 5 min · 15 min · 15 min in a 45-minute interview

“Design WhatsApp.” “Design a URL shortener.” “Design YouTube.” Questions like these can feel impossible the first time: there's no single right answer, no compiler to tell you you're wrong, and 45 minutes on the clock. The good news is that every one of them is solved with the same five-step routine and the same ten building blocks. Learn those once, and the famous questions in the next parts of this course become variations on a theme.

What is system design?

System design is deciding how the pieces of a software system fit together so it stays fast, reliable and affordable as it grows from ten users to millions. In interviews there are two kinds:

  • High-level design (HLD): the big boxes and arrows: servers, databases, caches, queues and how data moves between them. This course is about HLD.
  • Low-level design (LLD): classes, interfaces and design patterns inside one service (“design a parking lot”).

Interviewers aren't looking for one perfect diagram. They want to see you clarify a vague problem, make sensible assumptions, and explain trade-offs, the way you'd work with a senior engineer on a real project.

The READS framework: 5 steps for any question

  1. Requirements (≈5 min). Ask what the system must do (functional: “users can send messages”) and how well (non-functional: scale, speed, availability, consistency). Agree on 3 or 4 core features and say what you're leaving out.
  2. Estimates (≈5 min). Rough numbers: users, requests per second, storage, read/write ratio. They decide whether you need one database or a hundred.
  3. API (≈5 min). The few endpoints clients will call, e.g. POST /urls, GET /{code}. This pins down inputs and outputs before you draw.
  4. Design (≈15 min). A high-level diagram and the data model: which tables or keys, which database type and why.
  5. Scale (≈15 min). Find the bottlenecks and single points of failure, then fix them: caching, replication, sharding, queues. Discuss trade-offs and what you'd monitor.

The building blocks

Nearly every design is assembled from these pieces. Follow one request from left to right:

📱 Usersweb + mobileDNSname → IPCDNstatic files nearbyLoad balancerspreads trafficApp server 1statelessApp server 2statelessApp server 3statelessCache (Redis)hot data, in memoryDatabaseprimary + read replicasMessage queue→ background workersObject storageimages, videos (S3)
Almost every answer is built from these ten blocks. The skill is knowing which one fixes which bottleneck.
BlockWhat it doesReach for it when…
Load balancerSpreads requests across many servers and skips dead ones.One server can't handle the traffic, or must not be a single point of failure.
Cache (Redis, Memcached)Keeps hot data in memory: ~100× faster than a database read.The same data is read far more often than it changes.
CDNCopies static files (images, video, JS) to servers near users.Users are spread across cities or countries; pages feel slow.
SQL databaseTables, joins, transactions (ACID). PostgreSQL, MySQL.Data has clear relations and must be correct: payments, orders, users.
NoSQL databaseKey-value, document or wide-column. DynamoDB, MongoDB, Cassandra.Huge scale, simple access patterns (look up by key), flexible schema.
ReplicationCopies of the database: one primary for writes, replicas for reads.Reads overload the database, or you need a backup if it dies.
ShardingSplits data across machines by a key (e.g. user_id % N).Data or writes no longer fit on one machine.
Message queue (Kafka, SQS)A to-do list between services; workers process it at their own pace.Slow tasks (email, video encoding) or traffic spikes that must not block users.
Object storage (S3)Cheap, durable storage for big files, addressed by a key.Photos, videos, backups, documents.

How a system grows: watch the bottlenecks move

Every block exists to fix a specific bottleneck. Drag the slider and notice that each fix creates the next problem. This story is exactly what interviewers want to hear in the “Scale” step:

🎮 Scale it up: from 10 users to 100 million

📱 Users🖥️ App + database

Bottleneck

Just you and a few friends.

Fix

One server runs the app and the database. Simple, cheap, perfect for now.

The order is a guide, not a law. Real systems add pieces when a measured bottleneck appears, not before.

Vertical vs horizontal scaling

  • Vertical (scale up): buy a bigger machine. Easy, no code changes, but there's a ceiling and it's still one point of failure.
  • Horizontal (scale out): add more machines behind a load balancer. Nearly unlimited, survives failures, but servers must be stateless: no user data kept in one server's memory. Sessions go to Redis or a signed token instead.

Back-of-the-envelope estimates

You don't need exact numbers, just the right order of magnitude. Three facts do most of the work:

  • A day ≈ 100,000 seconds (86,400, rounded). So 1 million requests a day ≈ 10 per second.
  • Peak ≈ 2× average (more for events like a cricket final or a sale).
  • Memory is ~1,000× faster than disk for random reads. That's why caching matters.

🧮 Back-of-the-envelope calculator

Write QPS (avg)
231
Read QPS (avg)
2,315
Peak read QPS (≈2×)
4,630
Storage needed
18.3 TB

Formula: writes/day ÷ 86,400 seconds (round it to 100,000 in your head). Storage = writes/day × size × 365 × years. In an interview, round boldly and say your assumptions out loud.

Latency numbers worth knowing (rough)Time
Read from memory (RAM)~100 nanoseconds
Read 1 MB from memory~a few microseconds
Random read from SSD~100 microseconds
Round trip inside one data centre~0.5 milliseconds
Disk seek (spinning hard disk)~10 milliseconds
Round trip India ↔ US~200 milliseconds

Trade-offs interviewers love to ask about

  • Consistency vs availability (CAP): when the network splits, do you return possibly stale data or an error? A bank balance must be consistent; a like count can be a few seconds stale.
  • SQL vs NoSQL: SQL for relations and transactions; NoSQL for massive scale with simple key lookups. “It depends on the access pattern”, then explain the pattern.
  • Latency vs cost: more caches and regions make things faster but cost more money and complexity.
  • Push vs pull: send updates to users the moment they happen (WebSockets, push notifications), or let clients ask periodically (polling). You'll see this in the WhatsApp design.

🧠 PATH memory card

Remember system design basics for good

Picture it · Anchor it · Trace it · Hit-recall it. Four quick steps that turn “I read it once” into “I can explain it in an exam”.

  1. P

    Picture it

    Your brain remembers scenes far better than definitions.

    The canteen at lunch break 🍽️🧾Order counter= load balancer👩‍🍳Many cooks= app servers🥪Ready-made shelf= cache🏬Store room= databaseRush hour? Add cooks, stock the shelf, open a second counter. That's scaling.

    ← swipe to see the whole picture →

    Your college canteen at lunch break is a scaled system. The counter routes students to a free cook (load balancer), many cooks work in parallel (stateless app servers), the ready-made shelf serves popular items instantly (cache), and the store room holds everything else (database).

  2. A

    Anchor it

    A silly sentence you can't forget, where every word maps to the concept.

    “Before you design, READS the question”

    • R→Requirements: functional + non-functional
    • E→Estimates: QPS, storage, read/write ratio
    • A→API: the few endpoints clients call
    • D→Design: boxes, arrows and the data model
    • S→Scale: bottlenecks, failures, trade-offs
    • Canteen→Counter = LB, cooks = servers, shelf = cache, store room = DB
  3. T

    Trace it

    Run it by hand on a tiny example once. Doing beats reading.

    “Design a college notice board app.” R: admins post, students read, 20,000 students. E: 20,000 × 10 reads/day = 200,000/day ≈ 2 reads per second, tiny. A: POST /notices, GET /notices. D: one app server + PostgreSQL. S: result day spikes 50×? Cache the latest notices and add a second server behind a load balancer. Five steps, two minutes, no panic.
  4. H

    Hit-recall it

    Test yourself now, then again on the day each card comes back.

    Card 1 / 8 · new0 mastered · 0 practised

    Say the answer out loud first, then flip and be honest.

Common mistakes in system design interviews

  • Jumping into boxes before agreeing on requirements and scale.
  • Name-dropping tools (“Kafka! Kubernetes!”) without saying what problem they solve.
  • Designing for Google scale when the requirements say 10,000 users. Over-engineering is a red flag too.
  • Ignoring failure: what happens when a server, the cache or a whole data centre dies?
  • Going silent. Think out loud; the reasoning is what's graded.

Where to go next

Now use READS on a real interview favourite. The next part designs a URL shortener like TinyURL, one of the most frequently reported system design questions at companies like Google, Amazon and Microsoft: design a URL shortener. If hashing still feels shaky, review hashing from the DSA course first.

Key takeaways

  • Answer every question with READS: Requirements, Estimates, API, Design, Scale.
  • Agree on 3–4 core features and the scale before drawing anything.
  • A day ≈ 100,000 seconds; estimate orders of magnitude, not exact numbers.
  • Load balancer + stateless servers scale out; cache and CDN cut read load; replicas and shards scale the database; queues absorb slow work.
  • Every choice is a trade-off. Say both sides out loud.

Frequently asked questions

What is system design?

System design is planning how the parts of a software system fit together so it works for many users: which servers, databases, caches and queues to use, how data flows between them, and how the system keeps working when traffic grows or a machine fails. High-level design (HLD) is about these big boxes and arrows; low-level design (LLD) is about classes and code inside one box.

How do I answer a system design interview question?

Follow a fixed order so you never freeze: clarify the Requirements, make rough Estimates of traffic and storage, define the API, draw a high-level Design, then Scale it by finding bottlenecks and discussing trade-offs. This guide calls it READS. Talk through your thinking the whole time; interviewers grade the reasoning, not one perfect answer.

Do freshers get system design interviews?

Usually lightly. Many companies focus on DSA for freshers and add system design for roles with around 2 or more years of experience. But basic questions (what is a load balancer, why use a cache, SQL vs NoSQL) do come up for freshers, and knowing the basics makes you stand out in projects and internships too.

What is the difference between horizontal and vertical scaling?

Vertical scaling means making one machine bigger (more CPU, RAM, disk). It's simple but has a hard limit and a single point of failure. Horizontal scaling means adding more machines and spreading the load across them with a load balancer. It can grow almost without limit and survives single failures, but needs stateless servers and more moving parts.

What is the CAP theorem in simple words?

When a network problem splits a distributed database into parts that can't talk to each other (a partition), the system must choose: keep answering with possibly stale data (Availability) or refuse some requests until the parts agree (Consistency). Banking systems usually choose consistency; social feeds and like counts usually choose availability.

🧠 Quick check: system design basics

  1. 1. The interviewer says “Design Instagram.” What should you do first?

  2. 2. Your app server keeps the user's login session in its own memory. What breaks when you add a load balancer and 3 servers?

  3. 3. 10 million writes per day is roughly how many writes per second?

  4. 4. The same product page is read thousands of times a minute but changes once a day. Best fix?

System Design for Beginners

Part 1 of 13: System Design Interview Basics