The whole tutorial, in order.
Every part and chapter, linked. Read it top to bottom the first time through; each chapter also stands on its own. New here? Start with the Outline.
Part 1 Measuring Latency
Establish the running example and the harness, then learn to read a latency distribution and set a budget before touching any code.
- 0 The running example and the harness The parcel sortation line, the scan-to-divert metric, and the measurement harness every later chapter reuses.
- 1 Latency as a distribution Why a mean misrepresents scan-to-divert under load, and why coordinated omission is physical on this belt, not a definition to memorize.
- 2 The latency budget Little's Law and Amdahl's Law as planning tools, the six sources of latency on this line, and the first measured per-stage decomposition of the scan-to-divert budget.
Part 2 Eliminating Work
The cheapest latency fix is work you never do: precompute, lay out memory for the access pattern, and stop paying for copies.
- 3 Eliminating work The scan decode path rebuilt without the allocation, the map lookup, and the recomputed table it never needed: the first chapter with a large, clearly measured optimization effect.
- 4 Zero-copy data layout The in-flight parcel ledger rebuilt from a ring of pointers to scattered heap records into one contiguous hot-field array, plus a false-sharing fix between two counters that share a cache line.
Part 3 Concurrency and Synchronization
Hand off work between threads without a lock, and split it across cores correctly.
- 5 Wait-free synchronization The scan-to-divert handoff rebuilt from a mutex-guarded queue, where the consumer sleeps and the producer waits on the same lock, into a fixed-capacity ring where neither thread ever blocks, plus the same ring in Rust, where the compiler rejects the race the C++ version depends on a reviewer to catch.
- 6 Exploiting concurrency The sort decision fanned out across the diverter lanes three ways: sequential, data-parallel (fixed slices across std::jthread), and task-parallel (one task per parcel through a thread pool), measured for throughput against the scan-to-divert deadline, plus the identical data-parallel split in Rust, where the disjoint output split is a compiler-checked borrow instead of a convention.
Part 4 Scaling and the Host
Scale a single box with caching and shard-per-core partitioning, move the slow parts off the hot path, then see what the host itself costs you and when it's worth taming. The pattern catalog closes out the part and the main guide, before the appendices reach past a single box.
- 7 Caching A barcode-to-route cache sits in front of a slow backing resolver built to cost something real, measured across four replacement policies (LRU, LFU, FIFO, SIEVE) on the same Zipf-skewed access trace, plus TTL staleness and a memoized pure function.
- 8 Shard-per-core partitioning An in-flight parcel tracker measured as one shared map behind one lock versus shard-per-core (direct hash routing, no lock on the hot path), then the sharded design again under induced hot-key skew before and after a routing-table rebalance.
- 9 Asynchronous processing The scan-to-divert hot path's audit write, measured synchronous-inline against handed off to a background event-loop consumer (epoll multiplexing, request batching, a buffer pool, bounded backpressure), plus the identical hand-off in idiomatic Rust, where async/await and an executor replace the event loop, and off-path telemetry export to the LGTM stack.
- 10 Taming the host The scan-to-divert hot path run against a reproducible background noise load inside a throwaway KVM guest, measured on a stock boot against CPU isolation, pinning, SCHED_FIFO scheduling, and memory locking applied individually and combined, alongside a cyclictest before/after of the guest's own scheduling latency.
- 11 Catalog index The ten technique patterns from this guide, mapped to the part of the scan-to-divert budget each one narrows, the problem signal that calls for it, and the effect its own chapter measured.
Part 5 Appendices
Material that reaches past the single-box spine of the main guide. The first appendix measures how a latency-sensitive handoff behaves when it has to cross from one virtual machine to another on the same host, where shared memory, a socket, and a shared filesystem sit on very different rungs of the same ladder.
- 12 Appendix A: sharing memory between virtual machines A parcel-handoff record measured crossing between two throwaway KVM guests three ways, shared memory, a vsock socket, and a shared virtio-fs directory, as a latency ladder spanning three orders of magnitude.
- 13 Appendix B: remote memory across hosts What one-sided RDMA writes deliver in principle when the deadline crosses a physical host boundary, and a soft-RoCE lab that proves the verbs flow moves bytes correctly without claiming anything about its latency.
- 14 Appendix C: the RDMA architecture on OpenShift Virtualization How the cross-host RDMA architecture maps onto OpenShift Virtualization, with a bridge-networked KubeVirt soft-RoCE proof that runs on single-node OpenShift Local and a named, not-run-here SR-IOV path for the real hardware.