Learning roadmaps
82 chapters is a library, not a course. These are 6 routes through it, in order, each with a time cost, a checkpoint you have to pass, and a list of what to leave unread for now.
Which one is yours
Pick by where you are now and what you want to be able to do, not by what sounds most advanced.
Ends when a slow request, a memory graph that won't come down or a dropped packet has an explanation you can check, not a shrug.
async function. You couldn't say why the counter came out wrong.Ends when you can look at shared state and say what can interleave, what a lock costs under contention, and why p99 blew up at 80% CPU.
Ends when you can say why a query is slow from its plan, which isolation level stops which bug, and what a Kafka partition key decides.
Ends when you can say what a replica can promise a reader, how keys find their owner, why Raft needs a majority, and how a checkout stays correct across two services.
Ends when you can trace a request from DNS to a pod, read a latency histogram honestly, set an SLO, and size a fleet.
Shorter and denser. The method, the building blocks that get asked about, ten case studies in order of how often they come up, then daily practice.
Writes backend code → knows what the machine is doing
Five stages from the CPU up to containers. You won't read every page of every chapter, and you shouldn't try.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
Where the time in a loop actually goes
one weekStart here because almost every performance surprise later on, from a slow hash map to a database that falls off a cliff at some table size, comes back to two facts: the core guesses ahead, and memory is far away. Both chapters open with something you run, so run it. Reading the numbers is not the same as watching 16 KB and 64 MB behave like two different machines on your own laptop.
Don't worry about memorising latencies; you'll probably forget the exact numbers anyway. You want the shape of the curve in your head, roughly where it bends, and why.
Run the pointer-chasing loop from chapter 2 §01 at 16 KB, 1 MB and 64 MB. Before you run it, write down how many times slower you think the 64 MB trip will be. If you were off by more than 3×, reread §05.
Then explain, without notes, why sorting an array first can make a loop with an if in it run faster even though it does strictly more work.
Chapter 1 §04 (instruction-level parallelism) and §06–§07 on a first pass, and all of chapter 2 §06 on coherence. Coherence matters a lot, but it'll make sense in roadmap B, when two threads share a line.
Processes, threads, and the cost of asking the kernel
one weekYour service is a process the kernel schedules, and every read, write, accept and sleep is a request to the kernel. This stage is about knowing what those requests cost, because the fix for "it's slow and the CPU isn't busy" is usually somewhere in here.
Read chapter 6 whole. In chapter 7, the parts on interrupts and signals are good but can wait.
Pick a program you use daily and run it under strace -c (Linux) or dtruss (macOS). Name its three most frequent syscalls and guess why each happens that often.
Explain why a million 1-byte write() calls take orders of magnitude longer than one 1 MB write, and what BufWriter/bufio/BufferedWriter changes. Chapter 7 §05 has the numbers if you get stuck.
Chapter 7 §06–§07 (interrupts, signals). Come back to signals the first time a process ignores your Ctrl-C.
Virtual memory, and why RSS lies to you
one weekMost "memory leak" tickets aren't leaks. They're a process that touched memory once and an allocator that kept it, or a graph showing virtual size when someone meant resident size. Chapter 4 explains what the numbers mean; chapter 5 explains why they don't go back down.
The fork and copy-on-write section is the one people skip and later wish they hadn't, because it explains why Redis snapshots can double memory use for a moment.
Allocate 4 GB in a small program without touching it, and watch RSS in top. Then touch every page and watch again. Explain the difference in one sentence.
A Python service frees a big list but its RSS stays at 3 GB. Give two explanations from chapter 5 §05 and say how you'd tell which one it is.
Chapter 4 §07–§09 (huge pages, TLB pressure) unless you run databases or JVMs with big heaps. Chapter 5 §03, the build-your-own-allocator walk, is fun but optional.
Files, the page cache, and a packet's way in
two weeks of eveningsTwo chapters, one idea in both: the kernel puts a layer of memory between your program and the device, and that layer is why things are fast and why things get lost. write() returning doesn't mean the data is on disk. A packet reaching the machine doesn't mean your program will ever see it.
This is probably the longest stage. Chapter 10 is 40 minutes of dense reading, so give it two sittings, maybe three.
Write down, in order, the calls that replace a config file so that a power cut at any moment leaves either the old file or the new one, never half of each. Check your list against chapter 8 §04. Most people forget the last step.
Name three places between the network card and your recv() where a packet can be dropped, and one counter you'd look at for each.
Chapter 9 (block devices and SSDs) entirely for now; it's worth it once you run databases. Chapter 10 §06 and §08 (multi-core scaling, kernel bypass) unless you're working on a proxy or load balancer.
A container is a process with three things done to it
one weekEverything in the earlier stages comes together here: processes (stage 2), memory limits (stage 3), filesystems and network interfaces (stage 4). A container isn't a small VM. It's an ordinary process the kernel lies to in three specific ways, and once you've built one yourself, "the container got OOM-killed" stops being mysterious.
Follow chapter 11 §05 and run a shell in its own PID, mount and network namespaces with a memory limit. Inside it, run ps and explain why you see so few processes.
Then set the memory limit to 50 MB, allocate 100 MB, and explain who killed the process and how you'd find that out from outside.
§07 on user namespaces on a first pass. Chapter 12 (systemd) is a good follow-up but not part of this route.
Uses threads → can reason about concurrent code
Four stages. Do roadmap A's first stage before this one, or at least chapter 2 §01–§03, because cache lines show up everywhere here.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
Why count++ isn't one step
one weekLocks first, then the memory model. That's the reverse of the chapter numbers, on purpose: the lock chapter gives you the bug and the fix, and the memory model chapter then explains why a fix that "looked fine" on your laptop broke on a Graviton box.
Run two threads that each increment a shared integer a million times. Get a wrong answer, then fix it with a mutex and again with an atomic, and time both.
Explain in a paragraph why setting a ready flag after writing data can still let another thread see the flag before the data, and what one keyword or ordering fixes it.
Chapter 3 §04–§05 (the formal orderings and what they compile to). Come back when you write lock-free code, not before.
Threads, event loops, async and goroutines
one weekOne chapter, read whole. Every model in it is a different answer to the same problem: a request spends most of its life waiting on the network, and you don't want a whole thread sitting idle for it. Once you see that, the arguments online about async versus threads get a lot less heated.
A service handles 10,000 concurrent requests, each waiting 200 ms on a database. Work out what thread-per-request costs in stack memory alone, and say what changes with an event loop and with goroutines.
Name the one thing that will stall an event loop that a thread pool shrugs off.
Queueing, contention and the tail
one weekFor anyone running services, this is probably the most useful stage in the route. The maths is light (one law and one curve), and once it clicks, you'll stop being surprised that a box at 85% CPU is slow and a box at 60% isn't.
A service sees 2,000 requests a second and each one takes 25 ms. How many are in flight at once? Then: if service time doubles, what happens to the queue at 80% utilisation? Use chapter 16 §03–§04.
Explain why a request that fans out to 100 backends sees the backends' p99 as its own median.
Sharing data without one big lock
one to two weeksNow the coherence section from roadmap A pays off. False sharing, where two threads write different variables that happen to sit on one cache line, explains a lot of "we added cores and it got slower".
Lock-free is in here, but read it to know when not to use it. Chapter 14 is upfront that it rarely buys you throughput.
A counter map is hit by 32 threads. Sketch three designs from chapter 17 and say which one you'd ship and what would make you switch.
Explain what compare-and-swap does in one sentence, and why a CAS loop under heavy contention can be slower than a mutex.
Chapter 14 §07 (ABA, memory reclamation) unless you're actually writing a lock-free structure. Most people never should.
Uses a database → knows how it works inside
Five stages, from bytes on a page up to logs and streams. This is the route the system design case studies lean on hardest.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
Pages, B+trees, the WAL and LSM trees
one to two weeksFifty minutes of reading, and more or less the foundation for everything after it. Every database in the case studies, from Postgres to Cassandra to the thing under Kafka, is one of the two designs in this chapter, or a mix.
Explain why a B+tree with 4 KB pages finds one row among a billion in about four page reads, and which of those reads are probably already in memory.
A workload is 95% writes with random keys. Argue for B+tree or LSM using §07, and name the price you pay for your choice.
What a transaction promises, and the bugs it doesn't stop
one weekRead the whole chapter. Lost updates and write skew are behind a surprising share of real money bugs, and the default isolation level in most databases allows at least one of them. The bank example runs through the whole chapter, so don't skip ahead.
Reproduce the overdraft write skew from §07 in two psql sessions under the default level. Then fix it twice: once with SELECT ... FOR UPDATE, once with SERIALIZABLE, and say what each costs.
Reading a query plan, and Postgres from the inside
two weeks of eveningsChapter 20 teaches you to read what the planner chose; chapter 21 explains the engine underneath the most common database you'll meet. Section 4 of chapter 21, on why every index has to change when a row moves, is the same story as Uber's 2016 move from Postgres to MySQL in chapter 50.
Take one slow query from work (or the examples in chapter 20) and run EXPLAIN (ANALYZE, BUFFERS). Find the node where estimated and actual rows differ by more than 10×, and say what statistic is wrong.
Explain why a table that's updated constantly but never grows in row count can still grow on disk.
Chapter 20 §08–§09 (join ordering, prepared plans) and chapter 21 §06–§07 (wraparound, TOAST) until you operate Postgres yourself.
Caches, done properly, and Redis inside
one to two weeksCaching is where interview answers go vague ("put Redis in front of it"), so this stage is about the specific questions: who fills the cache, what happens on a write, how long a copy may live, and what stops a thousand requests from hitting the database the moment a hot key expires.
Design the cache for a product page read 50,000 times a second and edited a few times a day. Say which pattern from chapter 25 §03, what TTL, and exactly how you stop a stampede when it expires.
Work out roughly how much memory 10 million small Redis keys take using chapter 22 §06.
Chapter 25 §05–§06 (W-TinyLFU and policy comparisons) are great, but they're for when you're building a cache, not using one.
Kafka, and computing over streams
two weeks of eveningsKafka shows up in nearly every case study, usually with one sentence of justification. After this stage you'll be able to write the paragraph instead: why a log and not a queue, what the partition key decides, and what breaks when one partition gets all the traffic.
Choose a partition key for an orders topic where per-customer order must hold, and say what happens when one customer is a marketplace seller with 40% of all orders.
Explain watermarks to someone in three sentences, using a ride that's reported two minutes late as the example.
Chapter 23 §07, §11 (page cache, KRaft) and chapter 61 §10–§11 (stream joins, lambda vs kappa) on a first pass. Chapter 24 (columnar) and chapter 62 (search) are separate topics; read them when you need them.
Runs one database → understands distributed systems
Five stages. Assumes roadmap C or the equivalent, because almost every chapter here starts from a single database and asks what changes with two.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
Why you can't order events by timestamp
one weekDistributed systems start here because the first instinct, "just use the timestamp", is wrong in a way that only shows up under load. The cart example in §05 is the one to take your time over.
Two replicas' clocks differ by 300 ms. Walk through how last-write-wins loses an item from the cart in §05, then show the same two writes with vector clocks and say what the system now knows that it didn't.
Explain why a lock with a timeout isn't safe without a fencing token.
§02–§03 on Linux clocks, and §08–§09 (hybrid logical clocks, TrueTime) until a case study needs them. Spanner's TrueTime comes up in the Uber case study.
Copies, lag, and what a reader can be promised
one weekOne chapter, read whole. It sorts the vocabulary (linearisable, read-your-writes, eventual) by asking what a single user would notice, and that framing is what you'll use in every design discussion after this.
A user changes their profile photo, reloads, and sees the old one. Name the guarantee that broke, and give two fixes with different costs.
With N = 3, explain why R = 2 and W = 2 guarantees a read sees the latest write, and what goes wrong with sloppy quorums.
Giving every key an owner
one weekEvery case study has a line like "shard by user_id". This chapter is the reasoning behind that line, including the two places it hurts: queries that don't use the partition key, and the one key everyone wants.
Add a fifth node to a four-node hash ring. What fraction of keys move, and why is it so much less than with hash(key) % N? Check it in the Consistent Hashing Lab.
A celebrity's posts all hash to one shard. Give two fixes from §06 and the cost of each.
§04 (jump hash, rendezvous) on a first pass.
Raft, majorities, and deciding who's dead
two weeks of eveningsThe hardest stage in the route, and the one most worth doing slowly. Use the Raft Lab alongside chapter 27: killing a leader and watching the election is worth more than any amount of reading about it.
In the Raft Lab, partition a 5-node cluster 3–2. Predict which side keeps accepting writes before you look, then explain why the other side can't, even though it has a leader that thinks it's fine.
Explain why a failure detector can never be sure a node is dead, and what Raft does about that.
Chapter 27 §07–§10 (figure 8, membership changes, pre-vote, Paxos) unless you're implementing consensus.
Transactions across services, and across regions
two weeks of eveningsChapter 31 is the most directly useful chapter in this route for day-to-day backend work. The outbox and idempotency keys come up in nearly every payment, order or booking design, and in every interview about them.
Design the checkout from chapter 31 §01 so a crash at any line can't leave a charge with no order. Use an outbox and an idempotency key, and say where each lives.
Say which of your company's data could be active-active and which must have one home region, and why.
Chapter 76 §08–§09 (last-writer-wins, CRDTs) unless you're building collaborative editing; the Figma and Notion case studies use them.
Ships code → runs it in production
Five stages, in the order a request meets them, then the tools for keeping it healthy.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
DNS, TLS, the edge and the load balancer
one to two weeksMost outages that "weren't our code" happen somewhere in this stage: a DNS TTL nobody remembered, a certificate that expired, a health check that marked every backend dead at once.
Run dig +trace on your company's domain and explain every step of the output.
A deploy restarts half the backends and users see errors for 30 seconds. Explain what draining in chapter 34 §06 would have changed, and which health check setting probably made it worse.
Chapter 35 §03–§04 (stub resolvers, DNS wire format) and §07 on certificate chains, until you're debugging one.
The private network, and who may call what
one weekTwo chapters about boundaries: which packets may cross, and which calls may. Both fail silently, a timeout instead of an error, an AccessDenied with no reason, and both are much easier with the mental model than with the console.
Explain why traffic between two availability zones shows up on the bill, and one design change that cuts it.
Given an IAM policy with an Allow on s3:* and an SCP with a Deny on s3:DeleteObject, say what a DeleteObject call gets and why, using chapter 37 §05.
Chapter 37 §06, §08, §10 (cross-account, IMDS, confused deputy) unless you're in a security role. Read §10 eventually, though.
VMs, functions, and how Kubernetes actually works
two weeks of eveningsKubernetes is 60 minutes of reading and you'll likely want two sittings. Its core idea, a loop that compares what you asked for with what exists and fixes the difference, is simple, and almost every confusing Kubernetes behaviour follows from it.
Run kubectl apply on a deployment and list, in order, every component that acts before the container starts. Check it against chapter 60 §01.
A Lambda's p99 is 2 seconds and its p50 is 40 ms. Say what's in the 2 seconds and two ways to shrink it.
Chapter 36 §05, §08 and chapter 60 §06–§07, §11–§12 until you run clusters yourself.
Metrics, traces, and finding where the time went
two weeks of eveningsIf you only do one stage of this route, make it this one. Averages hide the requests that matter, labels can quietly multiply a metrics bill by a thousand, and a flame graph answers in a minute what an afternoon of guessing doesn't.
Explain why you can't average p99s across instances, and what you do instead with histogram buckets (chapter 39 §06).
Profile one real service with a sampling profiler, find its widest frame, and decide whether the time is on-CPU or waiting.
Chapter 41 §07 (CPU counters) and §09 unless you're tuning hot loops.
SLOs, retries, overload, and capacity
one to two weeksRetries are the classic way a small outage becomes a big one, and chapter 40 has the arithmetic. Pair it with chapter 42's sizing method, which is the same Little's Law from roadmap B, used on a fleet.
Three services each retry 3 times on failure. Work out how many requests hit the bottom service when it starts failing, then fix it with a retry budget and jitter.
Size a fleet for 12,000 requests a second at 40 ms each, with an instance that handles 64 concurrent requests, and say how much headroom you'd add and why.
System design interview in a month
Five stages. If stage 2 feels like new material instead of revision, do roadmaps C and D first, because a month isn't enough to learn them from zero.
Hover a stage for what it gets you, click to open its reading list and checkpoint.
How the interview is scored, and a method to run
three eveningsStart with how you're judged, then the method. Most people fail these interviews on time management and on never finding the one hard part of the problem, not on missing knowledge, and chapter 43 is blunt about that.
Set a 5-minute timer and estimate QPS, storage per day and peak bandwidth for a chat service with 50 million daily users, the way chapter 38 §04 does. If one of your numbers would change a design decision, say which.
The building blocks every answer uses
one weekRevision, mostly, not first reading. These sections are where follow-up questions land: "what happens when the cache key expires?", "what's your partition key?", "what if the payment succeeds and the order insert fails?"
Without notes, answer each in two sentences: why Kafka and not a queue; what stops a cache stampede; how you query by a field that isn't the shard key; how an idempotency key works end to end.
The five case studies that come up most
one weekFeed fan-out, chat delivery, geospatial matching, contention on a scarce resource, and money that must not double. Between them they probably cover most of what gets asked. Read each one, then close it and redraw the final design from memory before moving on.
Open the engineering boxes this time. They're where the database choices, schemas and partition keys live.
For each of the five, on a blank page in 15 minutes: the final diagram, the primary database and why, one index you'd create, and the one hard part. Compare against the chapter's "whole system" section.
Five more, for range
one weekVideo upload and delivery, file sync, a chat system at a different scale from WhatsApp, a scheduler, and an LLM product. Read these faster than stage 3, and focus on what each does differently from the five you already know.
If you've got time left, Zomato, Amazon checkout and Google Maps are the next most common prompts.
For each, write one line: "this is like ___ except ___". If you can't fill in the blank, reread that chapter's requirements section.
Practise out loud until the interview
45 minutes a dayOne case study a day from a blank page, out loud, with a timer. Then open the chapter and check the interview questions at its end; those are the follow-ups you'll get. A friend asking "why?" after every box helps more than another chapter would.
A full 45-minute mock with someone else asking the questions. If you can't find a person, record yourself and listen back. It's painful, and it works.
The chapters no roadmap sends you to
Not because they’re less good. They answer questions you’ll only have in particular jobs, so read them when the question shows up. The case studies the interview route skips are in the full list.