Specimens · Vol. III · 2026 Hands-on diagrams: distributed systems & algorithms Chapters I — V

Volume III — opening pages

Push the pieces
yourself.

Push a button, move a slider, and watch the system respond. Each one is a hand-built diagram in motion, paired where it fits with a guide that explains the same machinery in full.

I

Distributed systems.

Many machines, sometimes wrong.

Specimen

CAP Theorem

Pick two. Toggle the partition. Watch the third guarantee fail.

open →
Specimen

Consistent Hashing

Add, remove, and move nodes around the ring.

open →
Specimen

Database Sharding

Range, hash, and directory strategies compared.

open →
Specimen

Read/Write Quorum

Tune N, R, W — watch reads and writes succeed or stall.

open →
Specimen

Isolation Levels

Dirty reads, non-repeatable reads, phantoms — side-by-side.

open →
Specimen

Rate Limiter

Token bucket, leaky bucket, fixed and sliding windows.

open →
Specimen

Circuit Breaker

State-machine resilience pattern, with failure playback.

open →
Specimen

Retry Strategy

Exponential, jittered, decorrelated — load-tested.

open →
Specimen

Load Balancer

Round-robin, least-conn, hashing, p2c — under real load.

open →
Specimen

Chaos Playground

Inject latency, packet loss, and node failure at will.

open →
Specimen

Raft consensus

Five nodes. Kill the leader. Watch the cluster elect a new one and replicate the log.

open →
Specimen

WAL + crash recovery

Issue writes, kill the process, restart — watch the WAL replay restore consistency.

open →
Specimen

Distributed cache

4 cache nodes + origin DB. Hot keys, stampedes, node failure, consistent vs modulo hashing, write-through/back/around, single-flight and stale-while-revalidate.

open →
Specimen

Thundering herd

Four scenarios (accept(), cache, condvar, cron), four fixes (EPOLLEXCLUSIVE, single-flight, signal-vs-broadcast, jitter). Slide N, watch the bar.

open →
Specimen

Split-brain cluster

5 nodes, click to cut links. Quorum mode refuses writes on the minority; unsafe accepts everywhere and conflicts on heal; LWW reconciles by clock.

open →
Specimen

Distributed lock

Redlock / ZooKeeper / etcd. Inject GC pauses and network partitions; toggle fencing tokens; watch corruption or rejection.

open →
II

Data structures.

Shapes that hold information well.

VIII

OS & kernel internals.

Below the application layer.

Specimen

Syscall Journey

A single read() through 20 stages: libc → syscall trap → KPTI → VFS → ext4 → page cache → block layer → NVMe → DMA → copy_to_user. Real cycle counts at every step.

open →
Specimen

CPU Scheduler

FCFS, Round Robin, Priority, and CFS-like — same five jobs, four algorithms, four very different Gantt charts.

open →
Specimen

Stack Frame

Function calls push frames; locals fill them; an overflow corrupts the return address. Toggle canary, NX, ASLR — watch the exploit succeed or get blocked.

open →
Specimen

Virtual Memory

Click a virtual page. TLB hit, page walk, minor fault, major fault from swap, or COW after fork() — the whole MMU on one diagram.

open →
Specimen

Memory Allocator

malloc with first-fit / best-fit / buddy; watch external fragmentation form. Slab caches for fixed-size kernel objects beside.

open →
Specimen

Filesystem (ext4)

Tiny ext4 layout: block groups, inode bitmap, block bitmap, inode table, data blocks, journal. Create + delete files live; simulate a crash and watch the journal replay.

open →
Specimen

Linux boot

UEFI → bootloader → kernel → initramfs → systemd → login. Step through six stages with memory map, disk activity, and the process tree growing under each.

open →
Specimen

How Docker actually works

A container is clone() + namespaces + cgroups + overlayfs. Toggle each primitive off and watch the isolation break.

open →
Specimen

NAND to CPU

Build AND/OR/NOT from NAND; then half-adder, full-adder, ALU, register, memory, a tiny Hack-style CPU running compute 2+3.

open →
Read alongside

Each specimen has
a guide.

The how is in the guides; this is where you push on it. Pair them — read first if you want context, push first if you learn by feel.

Open the guides →