Overview
Latency: Reduce delay in software systems by Pekka Enberg is a comprehensive guide that bridges latency optimization with distributed systems design. The book demonstrates how core latency concepts are tightly interwoven with what many consider best practice distributed systems techniques, revealing connections that aren’t immediately obvious.
What Clicked
The book starts slow (no pun intended) but gradually builds momentum, introducing latency techniques that overlap and closely intertwine with fundamental distributed systems concepts. What surprised me most was discovering how many “obvious” best practices are actually deeply connected to latency optimization principles.
The progression from high-level system design to CPU-level mechanics strikes the perfect balance, deep enough to be valuable without getting lost in either abstraction or minutiae.
Practical Value
Standout Sections
The caching chapter provided exceptional clarity with easy-to-grasp explanations. While the middle sections initially felt disjointed due to what at times felt like a lesson in distributed systems instead of latency, persevering paid off as everything connected together when I realized the author was making it extremely obvious how they are tightly coupled and overlap with latency techniques.
The book covers impressive ground:
- System colocation through CPU-level caching
- CPU cache coordination and multi-cache synchronization
- Locking mechanisms and concurrency patterns
- Latency hiding techniques
Each topic provides enough depth to understand the concepts and research further if needed.
What Makes This Book Different
Most technical books teach the “what” and “how” but skip the crucial “when”. This book excels at explaining when to apply specific techniques, making it immediately practical rather than just theoretical.
This focus on context and trade-offs transforms it from a reference manual into a decision-making guide that engineers at any level would benefit from, either from an education point of view or ability to apply at their place of work.
A Note on Rust
The code examples use Rust, which makes perfect sense for demonstrating locks, thread spawning, and low-level concurrency patterns. Coming from a TypeScript background with limited Rust experience (just the online Rust book and Rustlings), the examples required concentration to fully grasp.
For readers unfamiliar with Rust, I would expect this to be a lot harder to grasp if you want to follow along with the code examples. That said, Rust is the right choice here, although Go would be a great language for demonstrating these same concepts and perhaps a lot easier to read for those coming from more dynamic languages.
Final Thoughts
This is a book I’ll read again and regularly return to for refreshing specific topics. It’s valuable both as a comprehensive learning resource and a reference guide for specific latency optimization techniques.
Rating: 5/5
Would recommend for: Engineers working on distributed systems, performance-critical applications, or anyone wanting to deeply understand the relationship between latency and system design. Some programming experience required; Rust familiarity helpful but not essential.