From Scratch
54 boards, 92 lessons, 655 review questions, in 13 chapters. Read them in order. Each chapter builds on the one before.
Start here → Enough Go to read these builds
Contents
1Enough Go1 lesson
The handful of Go every build in this track leans on: errors as values, defer, maps, goroutines, channels and a mutex, each shown working and then found in a real build file.
2Redis9 lessons
Build Redis yourself, one problem at a time: a program that answers on a port grows a wire format, an in-memory map, expiry, eviction and crash-safe persistence, until the real client can't tell the difference.
- 01Build Your Own Redis, From Scratch10 Q
- 02Redis 01: The Socket That Answers7 Q
- 03Redis 02: RESP, The Wire Protocol7 Q
- 04Redis: The Map (SET / GET / DEL)7 Q
- 05Redis: One Thread, Many Clients7 Q
- 06Keys That Die (Expiry)7 Q
- 07Eviction: Memory Is Full7 Q
- 08Surviving a Crash (Persistence)7 Q
- 09Capstone: Redis, Everything7 Q
3HTTP Server9 lessons
A raw socket becomes an HTTP server: parsing the request, framing the body, routing, keep-alive, concurrency and chunked encoding, one layer at a time.
4Kafka9 lessons
A naive queue becomes a log, then segments with an offset index, partitions, consumer groups, replication and exactly-once delivery.
5Database9 lessons
An append-only file becomes a database: an index, pages, a B-tree, a write-ahead log and MVCC transactions, built rather than only diagrammed.
6LSM Tree6 lessons
A memtable and a WAL grow into SSTables, a sparse index, bloom filters and leveled compaction, the write-optimised engine behind LevelDB and Bigtable.
7Distributed Scheduler9 lessons
A tick loop grows a durable job store, a timing wheel, leader election and a dispatch queue, and runs straight into the hard part every scheduler eventually hits: time.
- 01Build Your Own Distributed Scheduler, From Scratch9 Q
- 02Scheduler 01: The Tick Loop6 Q
- 03Scheduler 02: Durable Job Store6 Q
- 04Scheduler 03: Heap and Timing Wheel7 Q
- 05Scheduler 04: Leader Election7 Q
- 06Scheduler 05: Dispatch Queue7 Q
- 07Scheduler 06: Idempotency and Fencing7 Q
- 08Scheduler 07: The Hard Part, Time7 Q
- 09Capstone: Scheduler, Everything7 Q
8Sharded KV store5 lessons
A key-value store spread over many machines: a hash ring, quorum reads and writes, hinted handoff when a node dies, and Merkle trees that find what drifted.
9Raft6 lessons
A cluster that agrees: leader election, log replication, crash-safe persistence and a replicated KV on top, run in a deterministic simulation with chaos tests.
10Kubernetes9 lessons
Reimplementing what the Kubernetes module describes from the outside: the reconcile loop, store and watch, the scheduler and the kubelet, to see the control plane instead of only using it.
- 01Build Your Own Kubernetes, From Scratch9 Q
- 02Kubernetes 01: Imperative to Declarative7 Q
- 03Kubernetes 02: The Reconcile Loop7 Q
- 04Kubernetes 03: Store and Watch7 Q
- 05Kubernetes 04: Objects and Controllers8 Q
- 06Kubernetes 05: The Scheduler8 Q
- 07Kubernetes 06: The Kubelet8 Q
- 08Kubernetes 07: Services and Networking7 Q
- 09Capstone: Kubernetes, Everything7 Q
11Git6 lessons
Content-addressed blobs, trees, commits, refs and checkout, written in Go until the real git reads and clones what the build wrote.
12DNS Server6 lessons
A UDP socket becomes a name server: header, question, answer, compressed names and a forwarding resolver, checked against the real dig.
13Container Runtime8 lessons
Namespaces, pivot_root, /proc, cgroups and a veth cable, written in Go until a box has its own hostname, files, processes, memory ceiling and network.
- 01Build Your Own Container Runtime7 Q
- 02Container 01: Fork and Exec7 Q
- 03Container 02: UTS and PID Namespaces7 Q
- 04Container 03: A Mount Namespace and pivot_root7 Q
- 05Container 04: /proc and /dev7 Q
- 06Container 05: Cgroups, Memory and Process Limits7 Q
- 07Container 06: A Network Namespace and a Virtual Cable7 Q
- 08Container 07: Everything7 Q
Borrowed from other tracks (22)
You don't need to take those tracks. These are the only lessons this track uses from them, and each is linked where it is needed.
- TCP vs UDP, and the 3-way handshakeNetworking · needed for Redis 01: The Socket That Answers
- The Shipping Container (Docker)DevOps · needed for Kubernetes 06: The Kubelet
- Inside your building (your router's life)Networking · needed for Kubernetes 07: Services and Networking
- Splitting the ledger (sharding)System Design · needed for KV: the ring
- PartitioningData Systems · needed for KV: the ring
- The copy clerks (database replication)System Design · needed for KV: quorum
- ReplicationData Systems · needed for KV: quorum
- The cut phone line (CAP, done properly)System Design · needed for KV: hinted handoff
- Amazon, the case studySystem Design · needed for KV: everything
- Who holds the pen (consensus & Raft)System Design · needed for Build Your Own Raft
- Consistency and ConsensusData Systems · needed for Build Your Own Raft
- Storage EnginesData Systems · needed for Build Your Own LSM Tree
- Storage Extras: richer indexes, warehouse schemas, column tricksData Systems · needed for Build Your Own LSM Tree
- HashingDSA · needed for Build Your Own Git
- Git: the ledger every change signs (commits, branches, merge and rebase)DevOps · needed for Build Your Own Git
- DNS ResolutionNetworking · needed for Build Your Own DNS Server
- DNS on the wireNetworking · needed for Build Your Own DNS Server
- Write the telegram yourselfNetworking · needed for Build Your Own DNS Server
- Running a Container for RealDevOps · needed for Build Your Own Container Runtime
- Processes, Threads & the KernelHow Computers Work · needed for Build Your Own Container Runtime
- Linux and the Shell: Processes, Files, Pipes, Permissions and SignalsDevOps · needed for Container 03: A Mount Namespace and pivot_root
- How a parcel finds any house on earthNetworking · needed for Container 06: A Network Namespace and a Virtual Cable