Latency injection: what a slow dependency does to your system
Slowness is a more common failure than outright crashes. Adding latency to one component on purpose shows how slowness spreads.
What causes it
Each caller holds memory, a thread or a connection while it waits. Make a dependency 200 ms slower and, by Little’s law, every caller holds roughly 200 ms × request rate more of those resources — often enough to tip a busy service into overload.
How to recognise it
- Upstream memory and connection counts rising
- Latency rising across every caller
- Timeouts beginning where they were never hit before
The math
Extra in-flight requests = arrival rate × added latency (Little’s law)
How to fix it
- Add timeouts upstream
- Clear the fault in the inspector
Reproduce it in the simulator
Open the simulator, build a small architecture and use Fault injection in the inspector, or push traffic past a component’s capacity.
Learn more
Part of the guide Load balancing and capacity planning.