Introduction to System Design

What it means to design a system, why it's hard, and how to think about it without drowning in jargon.

System design in 30 seconds

  • What it is: making many parts — services, databases, caches, queues — work together under real pressure, not making one function correct.
  • The mindset shift: ask what the system must guarantee and what it may sacrifice, not which technology to pick.
  • Functional vs non-functional: features are the easy list; the non-functional targets (latency, throughput, availability, consistency) shape the architecture.
  • The one habit: write non-functional targets as numbers before drawing a single box.
  • The toolkit: load balancers, caches, databases, replication, sharding, queues, CDNs — learn the problem each solves and what it costs.
  • The real skill: choosing a sensible set of trade-offs for your constraints, not finding the single right answer.

Designing a system is like planning a city

Think about what it takes to run a city, not just build one house. One house is a self-contained thing — you decide the rooms, lay the bricks, done. A city is different: roads have to carry rush-hour traffic, the water supply can't fail when half a million taps open at 7am, power has to reroute when a substation trips, and the whole thing has to keep working while it grows. Nobody finishes a city; they keep it standing and let it expand.

System design is city planning for software. A single function is a house — make it correct and move on. A system is the city: many moving parts that have to cooperate under load, survive the failure of any one part, and grow without being torn down and rebuilt. That's why the skills feel so different from ordinary coding, and why this page spends its time on how to think, not what to type.

The problem it solves: software that meets reality

Code that runs perfectly on your laptop meets a very different world in production. Real systems face four pressures at once, and every one of them can break a design that only ever considered the happy path:

  • Scale — a thousand users is easy; a million at once is a different machine entirely.
  • Failure — networks drop packets, disks die, a whole data center can go dark. Not if, but when.
  • Latency — the speed of light and slow disks are real; a chatty design feels sluggish no matter how clean the code.
  • Change — requirements shift, so the design has to bend without a rewrite each time.

System design is the discipline of meeting those pressures on purpose instead of being surprised by them. Skip it and your software works in the demo and falls over the first real day in production — which is exactly the gap this whole portal exists to close.

What system design actually is

Writing a function is about making one thing correct. System design is about making many things work together — services, databases, caches, queues, and networks — so the whole behaves well under real-world pressure: lots of users, flaky networks, hardware that fails, and requirements that keep changing. It's less about a single right answer and more about choosing a sensible set of trade-offs for your constraints.

A useful mental shift: stop asking 'what technology should I use?' and start asking 'what does this system need to guarantee, and what is it allowed to sacrifice?' Every good design decision falls out of that second question.

Why there's no single 'correct' design

Beginners often hunt for the one right architecture, the way there's one right answer to 2 + 2. There isn't. A design that's perfect for a scrappy startup — cheap, simple, one database — is wrong for a bank, and the bank's design is wildly over-built for the startup. Same problem, different constraints, different correct answer.

So 'is this design correct?' is the wrong question. The right one is 'is this design appropriate for these constraints, and can I defend the trade-offs I made?' An interviewer isn't grading you against a secret ideal diagram; they're watching whether your choices follow from the requirements. That reframing takes a lot of the fear out of the blank page.

Functional vs non-functional requirements

Functional requirements are what the system does: 'users can post a photo', 'users can search for a product'. Non-functional requirements are how well it does them: how fast (latency), how many at once (throughput), how reliably (availability), how correctly under failure (consistency), and how much data it holds. Beginners obsess over the functional list; experienced designers know the non-functional targets are what actually shape the architecture.

Functional requirementNon-functional requirement
AnswersWhat does it do?How well does it do it?
ExampleUsers can upload and view photos.A photo loads in under 200ms for 99% of views.
Easy to list?Yes — it's basically the feature list.No — you have to think about scale and failure.
Shapes the architecture?Tells you which components exist.Decides how those components are arranged and sized.
If you get it wrongA missing feature — visible, easy to add later.A system that collapses under load — expensive to retrofit.
Turn a vague prompt into numbers before you design anything (pseudocode)
# Prompt: "Design a photo-sharing app."  <- too vague to design.
# First, pin the non-functional targets as NUMBERS:

users            = 100_000_000      # total registered
daily_active     = 10_000_000       # who actually show up
reads_per_sec    = 50_000           # viewing feeds + photos
writes_per_sec   = 500             # uploading new photos
read_write_ratio = reads_per_sec / writes_per_sec   # ~100:1, read-heavy
p99_latency_ms   = 200              # 99% of requests faster than this
availability     = 0.999            # ~8.8 hours of downtime/year is OK

# Now the design almost writes itself: read-heavy + low latency
# => heavy caching and a CDN; writes are rare => the write path can be simpler.

Notice what happened there: the read/write ratio alone (about 100 reads for every write) already tells you to pour effort into the read path — caching, CDNs, replicas — and to worry far less about write throughput. You haven't drawn a single box yet, but the numbers have already narrowed the design.

The building blocks you'll keep meeting

Almost every large system is assembled from the same handful of parts, each solving a recurring problem:

  • Load balancers spread traffic so no one server is overwhelmed.
  • Caches keep hot data close and fast.
  • Databases store the source of truth — relational or non-relational.
  • Replication keeps copies for availability and read scale.
  • Sharding splits data when one machine isn't enough.
  • Queues decouple fast producers from slower consumers.
  • CDNs serve content from near the user.

You don't memorize these — you learn what problem each solves and what it costs, so you can reach for the right one when the requirements point to it. That's exactly how the component deep dives on this portal are written.

The most common building block in action: one balancer fanning traffic across a pool of servers.

The gap a feature list can't fill

Here's a trap that catches almost everyone at first. You get a prompt, you list the features beautifully — upload, follow, like, comment, feed — and it feels like real progress. But a feature list is just the house blueprint; it says nothing about whether the city's roads can carry the traffic.

Two systems with the identical feature list can need completely different architectures. 'Users can view a feed' is one bullet whether the app has 100 users or 100 million — but at 100 users a single database serves it, and at 100 million you need caching, fan-out, replicas, and sharding. The feature didn't change; the scale and latency targets did. That's the whole reason the non-functional numbers, not the feature list, drive the design — and why the first move in any design discussion is to pin those numbers down.

Where most beginners go wrong

A few predictable mistakes trip up almost everyone starting out. Naming them now saves you from them later:

  • Jumping to tech. Reaching for 'I'd use Kafka and Cassandra' before anyone has said how much data or how fast — the tools should fall out of the requirements, not lead them.
  • Designing for scale nobody asked for. Building a globally-distributed, sharded monster for an app that will have a few thousand users. Over-engineering is as wrong as under-engineering.
  • Ignoring failure. Drawing only the happy path and never asking 'what happens when this box dies?' — the failure story is half the design.
  • Skipping the numbers. Talking in vague adjectives ('fast', 'scalable') instead of targets ('p99 under 200ms, 10k QPS') that can actually be designed against.

Every one of these comes from skipping the mindset at the top of this page. Pin the guarantees down as numbers, justify each box by a requirement, and tell the failure story — do that and you've already sidestepped the most common traps.

A system is just boxes and arrows

Don't let the diagrams intimidate you. Every architecture, no matter how famous, is drawn with two shapes: boxes (things that do work or hold data — a service, a cache, a database) and arrows (a request or a piece of data moving from one box to the next). That's it. 'Designing a system' is deciding which boxes exist and how the arrows flow between them.

A useful habit is to trace a single request out loud, box by box, the way you'd narrate a parcel moving through a delivery network. If you can follow one request from the user's tap all the way to the data and back, you understand the design — and if you can't trace it, that's exactly where the design has a hole.

One request traced through the boxes, top to bottom (pseudocode)
User taps "load my feed"
   -> Load balancer         # picks a healthy app server
   -> App server (stateless)# any server can handle it
        -> Cache            # is the feed already computed? (fast path)
        -> if miss: Database# fetch posts, then store in cache
   <- App server builds the response
<- User sees the feed

# Read this as boxes (LB, app, cache, DB) joined by arrows (the ->).
# Every design on this portal is some version of this picture.

The read path and the write path are different problems

One insight pays off on almost every design: reading data and writing data are separate problems with separate solutions. Reads can be cached, copied to replicas, and served from the edge, because a slightly-stale read is usually harmless. Writes are harder — they have to land somewhere authoritative, stay consistent, and can't simply be duplicated for speed.

This is why the read/write ratio from earlier mattered so much. A read-heavy system (like a social feed) pours its effort into the read path — caches, CDNs, replicas. A write-heavy system (like a logging or metrics pipeline) worries about absorbing writes with queues and partitioning. Knowing which path dominates tells you where to spend your design budget before you've drawn anything.

The same data, two very different paths (pseudocode)
# WRITE path: must be durable and correct - no shortcuts.
write(post):
    db.save(post)                 # land it in the source of truth
    cache.invalidate(user_feed)   # old cached feed is now wrong

# READ path: can be fast and approximate - shortcuts welcome.
read(user_feed):
    hit = cache.get(user_feed)    # try the fast copy first
    if hit: return hit            # most reads stop here
    feed = db.query(user_feed)    # slow path only on a miss
    cache.put(user_feed, feed)    # make the next read fast
    return feed

How to use this portal

Work the path in order. Start here, learn the preliminary concepts (scalability, latency, availability, consistency) so the vocabulary is second nature, then go deep on each component with its trade-offs. Every component page ends with an Interview Lens so your learning doubles as interview prep. When you're ready to see it all assembled, the TOGAF scenario shows these pieces inside a real enterprise decision.

Next: the interview approach

A repeatable way to answer any design question.

Then: scalability

The first real concept — scale up vs scale out.

Everything else on this portal is a variation on the single idea introduced here — that a system is a set of parts you assemble to meet guarantees under pressure, trading one quality for another.

Why it matters

  • It reframes design from 'pick a stack' to 'choose trade-offs for a goal' — the mental model every later topic builds on.
  • The functional-vs-non-functional split is the lens that decides which components you even need.
  • Turning vague requirements into numbers is what makes an architecture defensible instead of a guess.

If ignored

  • You jump to technologies and end up with a design nobody can justify against the actual requirements.
  • You optimize for features the interviewer isn't grading while the scale and latency targets quietly decide the outcome.
  • Every component choice becomes arbitrary because there's no yardstick to measure it against.

Where it fits

  • Sits at the very top of the learning path — the frame you view every concept and component through.
  • Shapes the first few minutes of any design discussion, where guarantees and scope get pinned down.
  • Underpins the interview approach, which is just this mindset turned into a repeatable set of moves.

Related topics

Interview lens

Questions it unlocks

  • What's the difference between functional and non-functional requirements?
  • Where do you start when given a vague design prompt?
  • Why isn't there a single 'correct' system design?

60-second answer

I treat system design as choosing trade-offs for a set of guarantees, not picking technologies. So I start by nailing down non-functional targets as numbers — throughput, latency, availability, read/write mix, data size — because those drive the architecture far more than the feature list. Then I assemble well-understood building blocks, each justified by a requirement, and I'm explicit about what each one costs. There's no single correct design, only one that's appropriate for the constraints and whose trade-offs I can defend.

Common traps

  • Jumping to technologies before establishing what the system must guarantee.
  • Listing features while ignoring the non-functional targets that actually shape the design.
  • Hunting for the one 'right' answer instead of defending trade-offs for the given constraints.

Search topics

↑↓ to move · Enter to open · Esc to close