Lesson 01 · System Design

Why doesn't WhatsApp ever go down?

Two billion people. Every minute. Sending photos, voice notes, terrible memes. And somehow… it just works.

phone
phone

Day one: one server. One database. Easy.

When an app is small, this is all you need. The server cooks. The database remembers. Life is good. Nobody is crying yet.

you
server
database

Then a million people show up.

One server. A million requests. It starts sweating. Then catches fire. Then sends you a 3 AM Slack ping. This is the problem system design exists to solve.

server

Meet the cast.

A tiny sitcom of computers. Learn what each one does and you can architect almost anything. Tap any to peek at its glossary card — try and too.

you
server
database
cache
LBload balancer

One request's journey.

You tap "send." A tiny packet of data sets off on a tour through the system, stopping at each character along the way.

LB

Cache hit vs miss.

A is a sticky-note the server keeps. If the answer is on the note — instant reply. If not, it has to ask the database (slow).

cache
~5ms · cache answers, DB sleeps

Crank the traffic.

Drag the slider. Watch the server start sweating — then a load balancer shows up and the work gets shared. New word? Tap .

20 req/sec

Calm. One server is plenty.

Spot the bottleneck.

Reads are fast. Writes are crawling. Every request waits on a single -y component. Tap the suspect.

Four forces. Always pulling.

Every system design decision is a tug-of-war between these four. You can't maximize all of them — you trade.

Scale
Handle more.
Reliability
Never fall over.
Latency
Reply fast.
Cost
Don't break the bank.

What you'll learn next.

  • 1Load balancing — sharing the work
  • 2Caching — remembering on purpose
  • 3Databases — SQL vs NoSQL
  • 4CAP theorem — the cruel triangle
  • 5Designing real systems (WhatsApp, Uber, YouTube)

Recap

System design = choosing trade-offs at scale.

You now know the cast, the journey of a request, and the four forces. From here on, every lesson zooms into one piece of this picture.

server

— end of lesson 01 —