Learn system design by reading the code that proved it
28 canonical codebases, walked file-by-file at a pinned commit — the trade-offs frozen into real code, not folklore. Every page reads aloud, every system gets an “explain it like I'm 10”, every walkthrough steps through the request path.
Why an atlas, not another book
Books teach system design in the abstract: "use a write-ahead log", "prefer event loops for I/O-bound work", "content-address your data". Those are true and useless until you have watched a real codebase pay for them — where the loop lives, what the log record looks like, what trade was made to get there.
The atlas points at 34 (and growing) canonical codebases and walks through the decisions frozen into their code: the two or three defining trade-offs, the data structures that carry the design, the concurrency model, the seams where the system extends. You read the atlas entry, then you read the code alongside it. That is the whole method.
The deep-dives
How to use the atlas
- Pick a domain you want to understand — cache, storage engine, VCS,
web server, database, runtime... Browse
catalog.yaml(entries are tagged by domain and difficulty). - Read the catalog entry's "why" paragraph — it tells you what design lesson this codebase is unusually good at teaching.
- Shallow-clone the project so you can follow along:
Deep-dives pin the commit they were written against; expect small drift, the file/function landmarks are stable for years in mature projects.mkdir -p clones && git clone --depth 1 <repo-url> clones/<id> - Read the deep-dive top to bottom once (architecture → data structures → concurrency → trade-offs), then work the reading path in the actual clone, opening every cited file. The reading path is the product; the prose is the guide.
- Steal the lessons — each deep-dive ends with "what to steal": transferable design moves you can apply to your own systems.
Time budget: a deep-dive plus its reading path is a focused 3–8 hours (depending on the entry's difficulty rating). Do not rush the reading path.
The wider catalog
The atlas tracks 34 projects; 28 have deep-dives so far. Grouped by primary domain:
os-kernel (1)
- Linux kernel ↗cataloged
The most-used piece of software in existence, and the clearest proof that architecture beats features: “everything is a file” (VFS over wildly different filesystems), a driver model that lets thousands of vendors add…
cache (2)
- Redisdeep-dived
The canonical answer to "what does an I/O-bound server look like when you optimize for simplicity under load": a single-threaded event loop plus purpose-built data structures (SDS strings, incremental-rehash hash…
- Memcacheddeep-dived
The original "scale the database with a cache layer" tool that won the mid-2000s web by being aggressively boring: a text protocol you can speak with netcat, a slab-class allocator that fights fragmentation by never…
database (2)
- SQLitedeep-dived
The most deployed database on earth — in every phone, browser, and airliner — because of one architectural choice: strict layering with every environment assumption isolated behind one interface. Tokenizer → parser →…
- PostgreSQLdeep-dived
The reference relational server that outlived every proprietary rival: process-per-connection (not threads), MVCC via tuple versioning, write-ahead logging, and a planner/executor split that has shaped every database…
storage-engine (2)
- LevelDBdeep-dived
The cleanest published LSM-tree (log-structured merge tree) engine, small enough to read in a week: a memtable backed by a skip list, an append-only WAL, leveled compaction of immutable SSTables, and a manifest that…
- RocksDB ↗cataloged
LevelDB's design pushed to production extremes: column families, tiered compaction, rate limiting, Bloom filters per level, transactions via a write batch pipeline. Read after LevelDB to see what the elegant textbook…
web-server (3)
- nginxdeep-dived
The web server that broke Apache's thread-per-connection model and owns the top of the web-tier market share because of it: a master/worker process model where a supervisor holds the listening sockets, workers…
- Apache httpddeep-dived
The server that dominated the early web and stayed dominant for decades because of one architectural bet: extensibility as the product. The module API (handlers, filters, per-directory config like .htaccess) and…
- Caddy ↗cataloged
A modern web server where the idioms do the hard work: Go's goroutines where nginx hand-rolls state machines, an HTTP middleware chain, and automatic-HTTPS as a first-class subsystem rather than a bolt-on. Read…
proxy-lb (2)
- HAProxydeep-dived
The load balancer that refuses to drop traffic: run queues and tasks instead of threads, zero-downtime reload via socket handoff, and obsessive per-connection memory accounting (pools + ebtree). Teaches how to design…
- Envoydeep-dived
The modern data-plane architecture: an event loop per worker thread, filter chains as the extension model (network filters, HTTP filters), xDS as the control-plane API, and stats/tracing built into the skeleton.…
vcs (1)
- gitdeep-dived
A distributed VCS that displaced every centralized incumbent because of one structural bet, not features: a persistent, content-addressed object database (blobs/trees/commits/tags under a DAG of refs) with porcelain…
queue-log (2)
- Apache Kafkadeep-dived
The nervous system of every large data platform, and it won that slot with a design inversion: not a smart message router but a dumb, append-only, partitioned log that exploits the one thing disks and networks do at…
- NATSdeep-dived
A messaging server whose entire protocol is a handful of text lines (INFO/CONNECT/PUB/SUB), with subject-based addressing (foo.*.bar) and per-subscription goroutine delivery. Teaches protocol minimalism and the…
runtime (4)
- Node.jsdeep-dived
V8 + libuv + a module system, glued so that JavaScript became a server language. Teaches the embedding lesson: how you wrap an engine (handles/scopes/contexts in V8) and an event loop (libuv) into a coherent…
- CPythondeep-dived
The most widely run language implementation on earth, and it won that position through design decisions that predate its hype: a stable C API + reference-counted PyObject model that made native extensions…
- libuvdeep-dived
The portable event loop, distilled: poll/epoll/kqueue/IOCP behind one API, plus the async-cross-thread escape hatch (uv_async_t) and thread pool for blocking work (fs, dns). Small enough to read completely in a…
- V8 ↗cataloged
The fastest widely-deployed JS engine: Ignition interpreter, TurboFan optimizing compiler, concurrent+incremental marking, generational heap, hidden classes. Included for influence and as a reference, not a first…
language (1)
- Luadeep-dived
A whole language — lexer, parser, register-based VM, incremental GC, and the friendliest C embedding API ever designed — in ~30k lines with almost no dependencies. Teaches that a runtime's power comes from a few…
search-engine (1)
- Elasticsearchdeep-dived
Search made universally accessible — and it won by API design as much as by engineering: Lucene's inverted index wrapped in a JSON over HTTP interface with schema-on-the-fly, sharding and replication declaratively…
orchestration (1)
- Kubernetesdeep-dived
The operating system of the datacenter, and the biggest architectural bet in modern infrastructure: declarative desired state + level-triggered reconcile loops (controllers) instead of imperative actions. Users…
container (2)
- runcdeep-dived
What "a container" actually is, in ~30k lines: parse an OCI bundle (config.json), clone(2) with namespaces, set up cgroups, pivot_root, exec. Teaches the Linux container primitives one syscall at a time — the rare…
- Moby (Docker)deep-dived
The tool that made containers mainstream, and it won on a packaging design decision: images as immutable, content-addressed, layered tarballs with copy-on-write union mounts, plus one command (dockerfile → docker…
ml-framework (2)
- PyTorchdeep-dived
A tensor library that became the dominant training framework via one architectural bet: define-by-run autodiff, where the forward pass records a dynamic graph and backward walks it. Teaches how to layer an eager…
- llama.cppdeep-dived
LLM inference with no framework: ggml tensors, memory-mapped weight files, quantization as first-class, graph-built-per-model eval loops. Teaches performance engineering as architecture — how batching, KV cache…
browser-engine (2)
- Servodeep-dived
A browser engine built as independent crates (html5ever parser, stylo style system, WR/WebRender compositor) with task-based parallelism instead of one monolithic main thread. Teaches how to decompose a gigantic…
- Chromium ↗cataloged
The most dominant browser engine ever and the codebase behind Chrome/Edge/Opera: multiprocess sandboxing (browser vs renderer vs utility processes), Mojo IPC, the V8/Blink split. Its process architecture — splitting…
distributed (2)
- etcddeep-dived
Raft consensus in production clothes: a WAL-backed state machine, leader election, log replication, and snapshot/compaction — plus the watch API that turned it into Kubernetes' brain. Teaches the gap between a…
- Apache ZooKeeperdeep-dived
The coordination kernel beneath the entire Hadoop-era stack: it won because it turned consensus into a usable product — a tiny ordered namespace of znodes backed by an atomic-broadcast (ZAB) log, with ephemeral nodes…
editor (2)
- VS Codedeep-dived
The most-used code editor of the era, built on an unfashionable bet that won: Electron (Chromium + Node) for the UI, with all editor intelligence pushed out of the renderer into a separate extension-host process that…
- Neovim ↗cataloged
A 40-year-old editor architecture modernized without forking its soul: core/editor split, msgpack-RPC as the extension seam (clients, LSP, plugins all speak it), and Lua as embedded language replacing ad-hoc…
networking (1)
- curldeep-dived
Every protocol, every platform, zero dependencies, one API — for decades. Teaches portability as an architectural commitment (curl_multi for event-loop integration, a build system that spans embedded to…
media (1)
- FFmpegdeep-dived
The universal media toolbox: demuxers, decoders, filters, encoders, muxers as registered components behind lavf/lavc/avfilter APIs, with a directed-graph filter engine and SIMD-per-architecture optimizations. Teaches…