PPrepLearn
Progress Β· 0/8 phases

πŸ—“οΈ πŸ—“οΈ All 120 Days Reference β€” Storage Engineering Roadmap

16 min read Β· Notion

Every day has a specific deliverable. Not 'read about X' but 'implement/explain/run Y.' The three checkboxes in the tracker: Read or derived + Code written + Can explain without notes β€” all three must be ticked before marking a day Done.


Phase 1 β€” Go for Infrastructure (Days 1–15)

DayTopicDaily Milestone
1Go types, interfaces, error handlingImplement BlockStore interface + FileBlockStore. Wrap every error with context.
2Structs, embedding, value vs pointer receiversCachedBlockStore embedding BaseStore. Understand why pointer receivers for mutation.
3Slices, maps, sync.Pool for buffer reuseBenchmark: new alloc per read vs sync.Pool. Show GC pressure difference with GODEBUG=gctrace=1.
4Goroutines, channels, select, semaphoresFan-out parallel read: 100 files, 16 concurrent goroutines. Time it vs sequential.
5Context and cancellationwriteToReplicas with context timeout. Show partial writes cancelled correctly.
6Pipeline pattern3-stage pipeline: validate β†’ compress β†’ write. Buffered channels between stages.
7errgroup and structured concurrencyReplicate block to 3 nodes with errgroup. First error cancels remaining.
8sync.RWMutex + atomic countersBlockIndex with RWMutex. IOMetrics with atomic.Int64. Benchmark: Mutex vs RWMutex.
9O_DIRECT and aligned I/OOpen file with O_DIRECT. 4096-byte aligned buffer. Write 10,000 blocks. Verify no page cache.
10io.Reader/Writer, bufio, streamingStream 1GB file in 64KB chunks. Batch small writes with bufio.Writer + Flush + fsync.
11pprof: CPU + heap profilesRun high-throughput write loop. Profile CPU. Find hot function. Profile heap. Find top allocator.
12Benchmarks + benchmemBenchmarkBlockWrite with -benchmem. Find allocations per op. Eliminate top one.
13Go scheduler: GOMAXPROCS, goroutine leaksCreate a goroutine leak (channel send, no receiver). Detect with goroutine dump. Fix.
14sync.Pool + GC pressureBuffer pool for 64KB I/O buffers. Before/after GC stats. Measure throughput improvement.
15Phase 1 CapstoneHigh-throughput file ingestor: HTTP β†’ validate β†’ compress β†’ batch β†’ O_DIRECT write. >100MB/s. pprof clean.

Phase 2 β€” Linux Internals & OS (Days 16–30)

DayTopicDaily Milestone
16Virtual memory, page tables, TLBDraw: process address space layout. Explain VPN→PFN translation. Explain TLB miss cost.
17mmap for storage: page faults, MAP_SHAREDmmap a 1GB file. Write via pointer. msync(MS_SYNC). Verify data on disk with hexdump.
18Huge pages, madvise, MADV_HUGEPAGEEnable THP for a 2GB mmap region. Compare TLB miss rate: small vs huge pages via perf stat.
19VFS layer: inode, dentry, file structsDraw VFS call path for open(). Answer: what does an inode contain? What doesn't it?
20Page cache: read, write, writebackcat /proc/meminfo: identify Cached, Dirty, Writeback. Write 1GB, watch Dirty grow, fsync, watch clear.
21fsync, fdatasync, O_SYNC, O_DSYNCMeasure: write 1GB in 4KB chunks with no sync vs fdatasync vs fsync. Compare throughput.
22Block layer: bio, I/O scheduler, blk-mqcat /sys/block/nvme0n1/queue/scheduler. Change scheduler. Measure fio IOPS difference.
23iptables for storage networkingAllow iSCSI (3260) from one subnet, deny all others. Allow NFS (2049). Verify with nmap.
24strace: trace I/O syscallsstrace -e trace=pread64,pwrite64,fsync -T -tt on a storage process. Explain every syscall.
25lsof, /proc/PID/io, /proc/diskstatscat /proc/PID/io before/after a 1GB write. Explain: rchar vs read_bytes difference.
26perf stat: hardware countersperf stat -p PID sleep 10 on your Go storage daemon. Interpret: IPC, cache-misses, branch-misses.
27perf record: CPU flame graphperf record -g on your storage daemon. perf report. Identify top 3 functions by CPU time.
28BPF tools: biolatency, biosnoopRun biolatency -D 10 while running fio. Interpret the latency histogram. Find outlier I/Os.
29dmesg, SMART, disk error handlingCheck SMART for NVMe: nvme smart-log. Parse dmesg for I/O errors. Write: what would you alert on?
30Phase 2 CapstoneGo I/O profiler: O_DIRECT sequential + random RW, fsync timing, /proc/PID/io before/after, iostat during.

Phase 3 β€” Storage Fundamentals (Days 31–45)

DayTopicDaily Milestone
31Block vs File vs Object storageWrite a comparison table: protocol, namespace, POSIX, shareability, latency, use case. 3 real examples each.
32IOPS, throughput, latency relationshipDerive: if device is 1M IOPS at 4KB, what is throughput? If throughput is 7GB/s at 128KB, what IOPS?
33Queue depth and its effectfio: same workload at QD=1, 4, 16, 32, 64. Plot IOPS vs QD. Explain the saturation point.
34fio: sequential throughputseq-read 128K, seq-write 128K. Record: BW, IOPS, p50/p99 latency. Explain each field.
35fio: random IOPSrand-read 4K, rand-write 4K at QD=32. Compare to sequential. Explain the difference.
36fio: mixed and latency70/30 mixed at QD=32. Then QD=1 latency test. Record p99, p99.9, p99.99. Explain tail latency.
37NFS: server setup and tuningConfigure NFS server. Mount with nfsvers=4.1, rsize/wsize=1M, hard. Run fio over NFS. Compare to local.
38NFS internals: sync vs async exportRe-export with async. Run fio. Compare throughput. Explain the data loss risk. When would you use async?
39iSCSI: target + initiator setupConfigure targetcli. Connect with iscsiadm. lsblk shows new device. Format + mount. Run fio.
40NVMe/TCP: target + clientnvmet + nvme-tcp kernel modules. Expose NVMe namespace. Connect client. Compare latency to iSCSI.
41RDMA concepts: QP, WR, CQ, MRExplain: one-sided vs two-sided RDMA. Why does RDMA achieve lower latency than iSCSI?
42Replication: 3x modelDraw: 3-node replication write path. Calculate: storage overhead, read IOPS benefit, recovery cost.
43Erasure coding: RS(6,3)Draw: 6 data + 3 parity. Calculate: storage overhead vs 3x replication. When to use each?
44Erasure coding: reconstructionExplain: if 2 nodes fail in RS(6,3), how is data recovered? How many I/Os does reconstruction require?
45Phase 3 Capstonefio benchmark suite script. Run all 6 workloads. Write interpretation report. 3 follow-up questions answered.

Phase 4 β€” Distributed Storage Systems (Days 46–60)

DayTopicDaily Milestone
46CAP theorem3 examples: CP system, AP system, why P is non-negotiable. Design choice for a metadata store.
47Consistency spectrumLinearizability vs sequential vs causal vs eventual. Give a storage example of each.
48Raft: leader electionWalk through: follower timeout β†’ candidate β†’ RequestVote β†’ majority β†’ leader. Draw it.
49Raft: log replication and commitmentWalk through: client write β†’ AppendEntries β†’ majority ACK β†’ commit. Explain: what is committed?
50Raft in Go (hashicorp/raft)Implement a Raft-backed key-value store. 3 nodes on localhost. Write survives killing 1 node.
51GFS architectureDraw: master + chunkservers + clients. Explain: why is master not in the data path?
52GFS: chunk size, write pathExplain: why 64MB chunks? Walk through the GFS write/append path step by step.
53Dynamo: consistent hashing + virtual nodesDraw a consistent hash ring with 3 nodes + 9 virtual nodes. Show key placement.
54Dynamo: sloppy quorum + hinted handoffWith N=3, W=2, R=2: explain quorum overlap. What is hinted handoff? When does it trigger?
55Dynamo: vector clocks + anti-entropyExplain vector clock conflict detection. Merkle tree for anti-entropy. When do you need this?
56Ceph: RADOS, MON, OSD, MDSDraw Ceph component diagram. Explain: why does CRUSH not need a central lookup table?
57Ceph: CRUSH and placement groupsWhat is a PG? How does CRUSH map object β†’ PG β†’ OSD list? What happens when an OSD fails?
58Metadata management at scaleCompare: GFS master (in-RAM) vs etcd (Raft) vs Dynamo-style (sharded). When to use each?
59Object store metadata scalingAt 1 billion objects, metadata = how many GB? How does MinIO solve this? How does S3 likely solve it?
60Phase 4 Capstone3-node Go object store: consistent hash, 3x replication, PUT/GET/DELETE/LIST. Kill 1 node β†’ still works.

Phase 5 β€” Kubernetes Storage (Days 61–75)

DayTopicDaily Milestone
61PV and PVC: static provisioningCreate a PV. Create a PVC. Pod mounts it. Write a file. Delete Pod. Recreate Pod. File persists.
62StorageClass and dynamic provisioningDeploy NFS provisioner. Create StorageClass. PVC auto-provisions. No manual PV creation.
63AccessModes: RWO, RWX, ROX, RWOPTry to mount an RWO PVC on 2 nodes simultaneously. Observe failure. Switch to NFS (RWX). Observe success.
64VolumeBindingMode: Immediate vs WaitForFirstConsumerDeploy a pod with Immediate SC. See PV provisioned before pod scheduled. Switch to WFFC. Compare.
65CSI architecture: controller vs node pluginDraw: external-provisioner β†’ CSI controller β†’ storage API. kubelet β†’ CSI node plugin β†’ mount.
66CSI: CreateVolume and DeleteVolumeImplement CreateVolume (idempotent). DeleteVolume (idempotent). Test with csi-sanity.
67CSI: NodeStageVolume and NodePublishVolumeImplement NodeStage (format + mount to staging). NodePublish (bind mount to pod). Test with a real pod.
68CSI: RBAC and service accountsWrite ClusterRole with exact verbs needed. No over-privileged wildcards. Verify with kubectl auth can-i.
69NFS with Kubernetesnfs-subdir-external-provisioner. StorageClass. PVC. Pod writes. Verify on NFS server.
70iSCSI with KubernetesStatic iSCSI PV. PVC. Pod. Write data. Check that SCSI device appears on node.
71VolumeSnapshotsVolumeSnapshotClass. Take snapshot. Delete data. Restore PVC from snapshot. Verify data restored.
72PVC cloningClone a PVC with dataSource. Write to original. Clone. Verify clone has original's data.
73Debug: PVC stuck in PendingSimulate 5 different causes: no matching PV, provisioner down, wrong SC, WFFC with no pod, quota exceeded.
74mountPropagation: BidirectionalExplain why CSI node plugin needs Bidirectional. Show: without it, pod can't see the mount.
75Phase 5 CapstoneHostpath CSI driver in Go. Helm chart. kind cluster. PVC bound. Snapshot. Restore. csi-sanity passes.

Phase 6 β€” C++ Systems Programming (Days 76–90)

DayTopicDaily Milestone
76RAII: FileHandle classImplement FileHandle with constructor (open), destructor (close), pread/pwrite/fsync. Exception safe.
77Rule of FiveAdd: copy-delete, move-constructor, move-assignment. Verify with AddressSanitizer (-fsanitize=address).
78RAII: LockGuard, ScopedTimerImplement scoped mutex lock. Scoped timer that logs duration. Use in a storage function.
79unique_ptr: sole ownershipFileHandle β†’ unique_ptr wrapping. Transfer ownership via std::move. Verify no double-close.
80shared_ptr: shared ownershipConfig object shared across 3 storage threads. Explain: when does reference count drop to 0?
81Buffer pool with unique_ptr + aligned allocBufferPool using posix_memalign for O_DIRECT alignment. Acquire/release via unique_ptr deleter.
82Move semantics: value categoriesWriteRequest with move-only semantics. Pipeline: enqueue via std::move. Verify no copies via counter.
83Perfect forwardingsubmitWrite template with std::forward. Verify lvalue and rvalue both work correctly.
84std::string_view + zero-copy parsingParse NFS mount options string using string_view. No heap allocation. Benchmark vs std::string.
85std::mutex, std::unique_lock, condition_variableWAL with batch flusher thread. append() notifies. waitForDurable() waits on CV. fsync on flush.
86std::atomic and memory orderingIOMetrics with atomic counters. Explain: relaxed vs acquire/release vs seq_cst for each counter.
87std::shared_mutex for read-heavy metadataBlockIndex with shared_mutex. 8 reader threads + 1 writer thread. ThreadSanitizer (-fsanitize=thread): clean.
88Lock-free queue for I/O requestsImplement a single-producer single-consumer lock-free ring buffer for I/O requests.
89AddressSanitizer + ValgrindIntroduce a use-after-free bug. Find with ASan. Introduce a memory leak. Find with Valgrind. Fix both.
90Phase 6 CapstoneC++ buffer pool manager: LRU eviction, pin/unpin, dirty tracking, concurrent access. ASan + TSan clean.

Phase 7 β€” Performance Engineering (Days 91–105)

DayTopicDaily Milestone
91USE method: CPUApply USE to CPU: top, mpstat, perf stat. Identify utilization, saturation, errors on a loaded system.
92USE method: memoryApply USE to memory: free, vmstat, /proc/meminfo. Identify swap usage, OOM events, cache behavior.
93USE method: storage deviceApply USE to NVMe: iostat -x. Identify %util, r_await, aqu-sz, errors. Run fio simultaneously.
94USE method: networkApply USE to network: sar -n DEV, ip -s link, netstat -s. Find retransmits and packet drops.
95fio: interpreting every output fieldRun fio --output-format=json. Write a Python parser that prints: IOPS, BW, p50/p99/p999 for each job.
96fio: diagnosing low throughputSimulate: CPU bottleneck, low QD, small block size. fio shows each. Explain the diagnosis.
97fio: diagnosing high latencySimulate: device saturation, high queue depth. fio shows latency increase. Explain queuing theory.
98pprof: CPU profile in Go storage serviceLoad test your Phase 1 service. 30s CPU profile. Find the top function. Optimize it. Measure improvement.
99pprof: heap profile and allocation hotspotHeap profile. Find top allocator. Add sync.Pool. Re-profile. Show allocation rate drop.
100pprof: goroutine leak detectionIntroduce goroutine leak (channel send, no receiver). Watch goroutine count grow. Find with dump. Fix.
101pprof: mutex contention profileAdd unnecessary global Mutex. Find with mutex profile. Fix with RWMutex + sharding. Measure IOPS gain.
102iostat deep diveiostat -x 1 during fio. Interpret: %util, aqu-sz, r_await, wrqm/s. Explain each during the run.
103vmstat + sar for system-level viewvmstat 1: explain wa%, si, so, cs. sar -d: compare to iostat. When would you use sar over iostat?
104perf and BPF tools for storageperf record -e block:block_rq_complete during fio. Parse latencies. Compare to fio's own latency stats.
105Phase 7 CapstonePerformance audit report: baseline β†’ profile β†’ find bottleneck β†’ fix β†’ measure improvement. 2-page write-up.

Phase 8 β€” System Design & Interview Prep (Days 106–120)

DayTopicDaily Milestone
106Design: distributed object store (Part 1)Design metadata service: sharding strategy, consistency model, failure handling. Write it out.
107Design: distributed object store (Part 2)Design data placement: consistent hashing, replication vs EC decision, read/write paths. Draw diagrams.
108Design: distributed object store (Part 3)Design fault tolerance: node failure detection, re-replication, priority ordering, multi-DC.
109Design: backup system (Part 1)Design deduplication: content-defined chunking, SHA-256 index, dedup ratio estimation at 1PB scale.
110Design: backup system (Part 2)Design incremental-forever + synthetic full + recovery (instant restore vs full restore).
111Design: CSI driver for custom backendDesign all 8 CSI operations. Focus on idempotency. Draw topology-aware provisioning flow.
112Design: distributed WAL (Write-Ahead Log)Design a shared WAL service: ordering guarantees, group commit, checkpointing, recovery.
113Debugging story 1: write and practiceWrite STAR-format story: I/O latency spike. Practice saying it aloud in under 5 minutes.
114Debugging story 2: write and practiceWrite STAR-format story: memory/goroutine leak. Practice saying it aloud in under 5 minutes.
115Mock interview 1: system design (45 min)"Design a distributed NAS for 10,000 clients." Record yourself. Review. Note gaps.
116Mock interview 2: Linux/storage depth (30 min)"What happens when a K8s pod writes to an NFS-backed PVC?" Trace every layer.
117Mock interview 3: Go concurrency (30 min)Implement a token bucket rate limiter in Go (N ops/sec, burst support). Explain design choices.
118Mock interview 4: C++ debugging (20 min)Given buggy C++ code with use-after-free: find with ASan, fix with unique_ptr. Explain the pattern.
119Final checklist reviewGo through all 18 checklist items. For any marked incomplete: spend 2h on it today.
120Full capstone dry runDo a 90-min mock: 45 min system design + 30 min technical depth + 15 min behavioral. Record + review.

Related