What is System Design?

Planning how the parts of a software system fit together and work at scale.

What is it?

Writing a small app is one skill. Deciding how dozens of services, databases, and servers work together, so millions of people can use a product reliably and quickly, is another. That's system design.

It's more about decisions than code: Where should data live? How do the parts talk to each other? What happens when one part fails, or when ten times more people show up?

Explain like I'm 10

If writing code is building a single room, system design is planning a whole city: where the roads, pipes, and power lines go so everything keeps working as the population grows.

Examples

Questions system design answers

// Not code you'd run — these are the kinds of questions system design asks:

// - Should this data live in one database or be split across several?
// - What happens if this server crashes right now?
// - How do we serve 10 million users instead of 10 thousand?
// - Should two services talk directly, or through a queue?

How it works

First, understand the requirements: how many users, how much data, how fast it must respond. Then break the problem into components (servers, databases, caches, queues) and decide how they connect and what happens when one fails.

It's a repeated process of trade-offs, not a single right answer.

Why does it exist?

A system that works for 10 users can fall apart at 10 million: slow responses, crashes, lost data. System design lets you think through those problems before they happen and make trade-offs on purpose, not by accident.

When to use it

Use it whenever you plan something bigger than a single script: deciding how services, data, and traffic are organized before or while you build. It matters most once more than one person, or more than a handful of users, depend on it.

When not to use it

For a small script, a personal tool, or a prototype nobody depends on yet, heavy design is overkill. You'd spend more time planning for scale you don't have than building. Start simple and add design as real needs (more users, more data, more reliability) show up.

Common mistakes

  • Picking technologies before understanding the requirements and constraints.

  • Designing only for today's scale and ignoring what would change if usage grew 100x.

  • Assuming there's one 'correct' design instead of the best trade-off for the goals.

Practice exercises

  1. Easy:

    Pick an app you use daily (e.g. a messaging app) and list 3 questions you'd need to answer to design its backend.

  2. Medium:

    Sketch (in words) the major components you'd expect behind a simple photo-sharing app: what stores the photos, what stores the metadata, what serves requests.

  3. Hard:

    Describe what might break in your sketch above if the app suddenly went from 1,000 to 10,000,000 users.

Interview questions

What is system design, in your own words?

Deciding how a system's parts (servers, databases, caches, queues) fit together to meet needs like scale, speed, and reliability.

Why can't you just "add more servers" to fix every scaling problem?

The bottleneck often moves somewhere else, like a single database, which doesn't scale just because you added application servers.

What's the difference between a functional and a non-functional requirement in system design?

Functional requirements say what the system does ('users can post a photo'). Non-functional requirements say how well it does it ('responses under 200ms', 'handles 1M users').

What's the difference between vertical scaling and horizontal scaling?

Vertical scaling makes one machine more powerful (more CPU, RAM). Horizontal scaling adds more machines and spreads the load across them.

Why is horizontal scaling generally preferred for large-scale systems, despite being more complex?

One machine has a hard ceiling and is a single point of failure. Horizontal scaling has no fixed ceiling and survives individual machines failing.

What are some of the main non-functional requirements a system designer needs to gather before designing a system?

Availability (how often it must be up), latency (how fast it must respond), scalability (how much growth it must handle), consistency (how up to date replicas must be), and durability (whether data can ever be lost).

What is a single point of failure, and why does system design try to eliminate them?

A single component whose failure takes down the whole system. Designs remove them with redundancy and replication, because a system is only as reliable as its weakest required part.

Why do system design interviews emphasize trade-offs rather than a single correct answer?

Real systems balance competing goals (cost, consistency, latency, complexity) differently for different requirements. A good designer explains the reasoning behind a choice instead of reciting one 'correct' architecture.

What is back-of-the-envelope estimation, and why is it a common first step in system design?

Rough early math on users, requests per second, and storage growth. It shows which parts will be under strain, so you don't waste effort optimizing something that was never a bottleneck.

What's the difference between throughput and latency?

Latency is how long one request takes. Throughput is how many requests the system handles in a given time. A system can have high throughput and still feel slow per request, or the reverse.

Why might a design that works fine for 10,000 users fail at 10 million, even with no bugs?

Resources that seem unlimited at small scale (database connections, disk I/O, a server's memory) become real bottlenecks when traffic and data grow by orders of magnitude.

What is the CAP theorem, and why does it matter when designing a distributed system?

A distributed system can't guarantee Consistency, Availability, and Partition tolerance all at once during a network failure. Partitions happen in practice, so you must choose: stay consistent or stay available when the network splits.

What's the difference between designing for a read-heavy workload versus a write-heavy workload?

Read-heavy systems use caching and read replicas to serve the same data to many readers cheaply. Write-heavy systems focus on how writes are spread and ordered (sharding, queues), since caching doesn't help data that changes constantly.

Why is it important to clarify assumptions and scope before diving into a system's design?

Without agreeing on scale, key features, and constraints, two people can design very different, equally 'correct' systems for the same vague prompt. Clear scope focuses effort on what matters.

What does "availability" mean in system design, and how is it typically expressed?

The share of time a system is up and serving requests. It's usually a percentage of uptime (e.g. 99.9%, informally '3 nines') or allowed downtime per year.

Give an example of a trade-off between consistency and availability.

A bank might reject a request during a network partition rather than show a stale balance (consistency). A social feed might show slightly old data rather than fail (availability).

Why might adding a cache introduce new problems instead of simply making a system faster?

A cache can serve stale data if not invalidated correctly. It's another part that can fail or drift from the source of truth, and cache-invalidation bugs are notoriously easy to get wrong.

What's the risk of over-engineering a system design for scale it doesn't actually need yet?

You spend time and money on complexity (extra services, replication, queues) that solves no current problem, and you'll likely guess wrong about which future bottlenecks matter.