← Back to the map

Unit 0 · Lesson 1

What system design is

Two apps do the same thing. One works for 100 users. The other works for 100 million. The code for the feature is almost identical. So what's different?

By the end you can

Watch

Prefer reading? The same lesson is written out below.

Writing a feature answers "what should happen when someone presses this button?". System design answers the questions around it: where does the data live, how many machines run the code, what happens when one of them breaks, and how does it stay fast when ten times more people show up?

It's the difference between a recipe and running a restaurant. The recipe is the code. The restaurant is the kitchen layout, how many cooks you hire, where the fridge goes, and what you do when the oven breaks on a Friday night.

The building blocks

Most large systems are built from the same handful of parts, arranged differently:

UsersLoad balancerApp serverApp serverCacheDatabaseQueueWorker
Users reach a load balancer, which spreads requests over two app servers. The app servers use a cache and a database, and hand slow work to a queue that a worker processes.

This course takes each block apart: how it works, when to use it, and what it costs.

Everything is a trade-off

There is no "best" design, only designs that fit a situation. Adding a cache makes reads faster, but now you have two copies of the data that can disagree. Adding servers handles more traffic, but now they have to coordinate. Keeping one copy of the data is simple, but if that machine dies, you're down.

A good design names its trade-offs out loud: "We accept that a 'like' count may be a few seconds out of date, because it lets us serve the page from cache." That sentence is worth more than any diagram.

Key idea: system design is choosing and arranging the parts around your code (servers, storage, caches, queues) so the whole thing stays fast, available and correct as it grows. Every choice trades something for something else.

Check yourself

Which question is a system design question rather than a feature-coding question?

Your new flashcards

Practice them now. With a free account they come back in your daily review.

Card 1 of 4