Every chapter
75 chapters in 8 parts, and 8 labs. Parts build on each other from the processor upward, but every chapter says what it assumes, so you can start wherever your problem is.
The Machine
7/701
CPU Architecture for Software Engineers
Pipelines, superscalar issue, branch prediction, SIMD.
02
Memory Hierarchy & Cache Coherence
Cache lines, MESI, false sharing, NUMA. The 100x hiding in a struct layout.
03
The Memory Model & Atomics
Acquire, release, seq_cst. What the compiler and the CPU may reorder.
04
Virtual Memory & Page Tables
Page tables, the TLB, faults, huge pages, mmap, copy-on-write.
05
Allocators & Memory Management
malloc internals, arenas, fragmentation, and when the allocator is the bottleneck.
44
Speculative Execution, Spectre & the Mitigation Tax
The CPU runs code you never called. Meltdown, Spectre, and what KPTI and retpolines cost your syscalls.
45
GPUs for Systems Engineers
SIMT, warps, HBM, PCIe and NVLink. Why a GPU is a throughput machine and what that means for the code that feeds it.
The Operating System
10/1006
Processes, Threads & Scheduling
EEVDF and CFS, context-switch cost, cgroup CPU throttling.
07
Syscalls, Interrupts & the Kernel Boundary
The trap, the vDSO, what a syscall costs, and how io_uring removes it.
08
Filesystems & the Page Cache
Inodes, extents, journaling, and what fsync actually guarantees.
09
Block Devices & SSDs
NVMe queues, the FTL, write amplification, why SSD latency is bimodal.
10
The Linux Networking Stack
sk_buff to socket: NAPI, epoll, zero-copy, eBPF and XDP.
11
Containers from Scratch
Namespaces, cgroups v2, overlayfs, seccomp. Docker with the magic removed.
12
systemd & Process Supervision
Units, dependency ordering, socket activation, cgroup delegation, journald.
46
Linking, Loading & How a Process Starts
execve to main: ELF, the dynamic loader, the PLT and GOT, relocations, and why startup is slow.
47
Virtualization, Hypervisors & microVMs
VM exits, nested page tables, virtio, and how Firecracker boots a VM in 125 ms.
48
eBPF: Running Your Code in the Kernel
The verifier, maps, hooks and the JIT. How one bytecode ended up running observability, networking and security.
Concurrency
5/513
Locking Primitives, End to End
Mutex, futex, spinlock, RW lock, condvar, down to the CAS and the wait queue.
14
Lock-Free & Wait-Free Programming
CAS, the ABA problem, hazard pointers, epoch reclamation, RCU.
15
Concurrency Models
Threads, async, actors, green threads, work stealing, function colouring.
16
Contention, Queueing & Tail Latency
Lock ordering, convoys, priority inversion, and where p99 comes from.
17
Concurrent Data Structures
Lock striping, concurrent hash maps, ring buffers, the LMAX disruptor.
Data & Storage Engines
10/1018
Storage Engine Internals
B+tree versus LSM, page layout, the write-ahead log, the buffer pool.
19
Transactions & Isolation Levels
MVCC, snapshot isolation, write skew, and what serializable costs.
20
Query Planning & Execution
Volcano versus vectorized, join algorithms, cost estimation, index selection.
21
PostgreSQL Deep Dive
The heap, vacuum and xid wraparound, TOAST, WAL shipping, replication.
22
Redis Internals
The event loop, listpacks and skiplists, expiry, forks, cluster. The single-thread myth.
23
Kafka & the Log as a Primitive
ISR, acks, exactly-once, and the page-cache trick that makes it fast.
24
Columnar & Analytical Engines
Parquet layout, vectorized execution, late materialization, ClickHouse and DuckDB.
25
Caching, Properly
LRU, LFU, W-TinyLFU, stampedes, invalidation, coherence across a fleet.
61
Stream Processing
Event time, watermarks, windows, barrier checkpoints, and what exactly-once really covers.
62
Search Engines
How typing two words returns the best ten of ten million products in milliseconds: inverted indexes, BM25, WAND.
Distributed Systems
7/726
Time, Clocks & Ordering
Lamport clocks, vector clocks, hybrid logical clocks, TrueTime, and NTP reality.
27
Consensus: Raft, Paxos & Leases
Raft line by line, why Paxos is harder to read, and what a quorum read costs.
28
Replication & Consistency Models
Linearizable, sequential, causal, eventual. CRDTs and quorum arithmetic.
29
Partitioning & Rebalancing
Consistent hashing, range versus hash, hot shards, resharding without downtime.
30
Failure Detection & Membership
Gossip, SWIM, phi accrual, split brain, and why a timeout is a design choice.
31
Distributed Transactions
2PC, sagas, the outbox, idempotency keys, and exactly-once as marketing.
59
Distributed Training
A 70B model is 16 GPUs too big and 200 years too slow. Data, tensor and pipeline parallelism, the network, and surviving failures.
Cloud Infrastructure
8/832
Object Storage: S3 Internals
The keymap, erasure coding, strong consistency, multipart, storage classes.
33
VPC & Cloud Networking
CIDR, route tables, ENIs, NAT, encapsulation, and what cross-AZ traffic costs.
34
Load Balancing & Traffic Management
L4 versus L7, ECMP and Maglev, connection draining, health checks that lie.
35
DNS, TLS & the Edge
Resolution path, the handshake, cert chains, anycast, CDN cache keys.
36
Compute Abstractions
VMs, Firecracker microVMs, Lambda cold starts, and how a pod gets placed.
37
IAM & the Security Boundary
Policy evaluation order, STS, least privilege, the confused deputy.
60
Kubernetes Internals
kubectl apply writes one record and exits. Follow the watches, reconcile loops and kubelet that turn it into three running pods.
63
RPC, gRPC & QUIC
Protobuf on the wire, gRPC over HTTP/2, why one lost packet stalls every stream, and how QUIC moves the transport onto UDP.
Designing & Running Systems
6/638
The System Design Method
Back-of-envelope numbers, capacity first, and knowing which box to draw.
39
Observability
Metrics, logs, traces. Cardinality, sampling, Prometheus and OpenTelemetry internals.
40
Reliability Engineering
SLO arithmetic, error budgets, retries with jitter, circuit breakers, load shedding.
41
Performance Engineering
Flame graphs, perf, USE and RED, and benchmarks that are not lies.
42
Queueing, Capacity & Scaling
Little's Law, M/M/1, the universal scalability law, autoscaling that oscillates.
43
Systems Interview Mastery
How to structure a design answer, the rubric, and the question behind the question.
System Design Case Studies
22/2249
Designing WhatsApp
A billion phones online at once, messages that arrive exactly where they should, and a server that can't read them.
50
Designing Uber
Millions of moving cars, one request, a match in two seconds: hexagons, road graphs and the assignment problem.
51
Designing YouTube
Upload once, play anywhere without a stall: resumable uploads, a transcoding DAG, caches inside ISPs, DASH manifests and buffer-based bitrate.
52
Designing Stripe
A tunnel eats the reply and she taps Pay again. Idempotency keys, double-entry ledgers and signed webhooks make sure she pays once.
53
Designing Zoom
Five people on four continents inside a fifth of a second: RTP, NAT traversal, SFUs, video layers, jitter buffers and congestion control.
54
Designing ChatGPT
Words streaming within a second: prefill and decode, continuous batching, PagedAttention, prefix caching and speculative decoding.
55
Designing Google Maps
Draw any part of the world instantly and route across a continent with live traffic: tile pyramids, contraction hierarchies and ETAs.
56
Designing a Distributed Job Scheduler
Forty thousand customers to charge at midnight, once, whatever breaks: timing wheels, leases, idempotent jobs and the midnight herd.
57
Designing Valorant
Two players fire within milliseconds. How a 128-tick authoritative server decides who hit whom first, when every screen shows an old world.
58
Designing Netflix Recommendations
Forty rows, the titles in each, a picture on every one, chosen in a second: embeddings, nearest-neighbour graphs, bandits and experiments.
64
Designing Figma
Two designers edit one file at once, one in a train tunnel: OT vs CRDTs, per-property last-writer-wins and fractional indexing.
65
Designing Twitter's Home Timeline
One post to 300 followers, another to 100 million: fan-out on write vs read, Redis timelines, Snowflake IDs, Earlybird and ranking.
66
Designing Dropbox
Save a 2 GB project, see it everywhere, never lose an offline edit: 4 MB blocks, rolling hashes, three trees, Magic Pocket.
67
Designing Ticketmaster
Millions of fans, 70,000 seats, 10:00 sharp: seat holds that expire, signed queue tokens, random pre-queues and cached seat maps.
68
Designing Discord
One message, a million people online in one server: Snowflake-bucketed partitions, ScyllaDB, request coalescing and Elixir relays.
69Designing JioHotstar: Live Cricket at Scale
Dhoni walks out and millions tap Play at once. Live segments, request collapsing, multi-CDN steering and scaling before the crowd.
70Designing UPI
₹20 for chai moves between two banks that share nothing, in two seconds. Switches, VPAs, debit-then-credit, deemed payments and reconciliation.
71
Designing Zerodha and the Stock Exchange
Meera taps Buy at 9:15. Follow her order through risk checks and leased lines into NSE's order book, and the price back out.
72Designing Amazon's Cart and Checkout
Prime Day at midnight: a cart that never refuses a write, vector clocks, 1,000 deal units for a million taps, one order each.
73
Designing Cloudflare
A shop under a multi-terabit flood, a shopper who never notices: anycast, dosd fingerprints in XDP, Unimog, Pingora, isolates, Quicksilver.
74
Designing LeetCode
Two minutes left, a stranger's C++ hits the judge. Sandboxes from isolate to Firecracker, fair timing, checkers, rankings, winnowing.
75
Designing Notion
Everything is a block. A tree with parent-pointer permissions, Postgres sharded into 480 shards then tripled to 96 hosts, and SQLite in the browser.
The Labs
8/8L1
Lock Lab
A CAS succeeding, then failing. Two threads on one counter, one cache line.
L2
Queueing Lab
Drag utilization toward 1.0 and watch the latency curve go vertical.
L3
Raft Lab
An election and a log replication, message by message. Drop any one of them.
L4
Storage Engine Lab
The same keys into a B+tree and an LSM. Page splits on one side, compaction on the other.
L5
Consistent Hashing Lab
Add and remove nodes from a ring. Count exactly which keys move.
L6
Cache Eviction Lab
LRU, LFU and W-TinyLFU on one trace, hit rate updating per access.
L7
MVCC Lab
Two transactions, one row. Produce write skew, then prevent it.
L8
Packet Path Lab
One packet from write() to the wire and back, through every layer that touches it.