-
Book Overview & Buying
-
Table Of Contents
Mastering Distributed Observability in Rust
By :
Once these signals are visible, optimization becomes a diagnosis workflow, not a guessing exercise. The goal is not "make everything faster," but "remove the specific runtime behavior causing contention."
At this stage, ask one concrete question: Is checkout slow because business logic is expensive, or because the executor cannot schedule ready work quickly enough? The dashboard from Section 10.3 answers this. If the queue wait is high and the downstream spans are normal, the executor is the bottleneck. The two fixes below address the two most common causes of executor contention.
This is the single most important rule for Tokio-based services: never perform blocking work on an async worker thread.
Blocking means any operation that holds the OS thread without yielding to the Tokio scheduler. Common examples include std::thread::sleep(), synchronous file I/O (std::fs::read), CPU-heavy computation that runs...