Latency Correlation: Why Two Replicas Can Be Slow Together
You have two replicas. Each has a 1% chance of responding slowly. What’s the probability that both are slow?
0.01%?
Only if their latencies are independent.
And in distributed systems, that assumption is often wrong.
This is one of the most overlooked problems in tail latency optimization: Latency Correlation.
1. Independence makes redundancy look incredibly powerful.
Suppose two replicas each have a 1% probability of taking longer than 100ms.
If their latencies are independent:
P(Both slow) = 1% × 1% = 0.01%
Sending a request to both replicas and taking the faster response could dramatically reduce tail latency.
This is the mathematical intuition behind Hedged Requests.
But what if both replicas share the same bottleneck?
2. Shared infrastructure creates correlated latency.
Replicas may share:
- A congested network link
- A database or storage backend
- CPU or memory resources
- A connection pool
- A downstream service
When a shared dependency slows down, multiple replicas can become slow simultaneously.
In the extreme case of perfectly correlated slow responses:
P(Both slow) = 1%
That’s 100 times worse than the independent model predicts.
The redundancy still exists, but its statistical benefit disappears.
3. Hedging can make congestion worse.
Imagine a database approaching saturation.
Application requests begin slowing down.
Clients interpret these slow responses as replica-specific problems and launch additional requests.
But those requests ultimately reach the same database.
The extra workload increases queueing delays, triggering even more hedged requests.
A latency optimization becomes a load amplification mechanism.
4. How should we design around this?
Instead of assuming replicas are independent:
- Measure joint slow-response probabilities, not just individual P99s.
- Identify shared bottlenecks across request paths.
- Prefer replicas in genuinely separate resource domains.
- Limit redundant requests with explicit budgets.
- Reduce or disable hedging when shared dependencies are overloaded.
Useful measurements include:
P(Replica B is slow | Replica A is slow)
If this conditional probability is high, sending a second request may offer much less benefit than expected.
The key takeaway:
Redundancy reduces risk only to the extent that failures and performance degradations are sufficiently independent.
Two replicas are not necessarily two independent chances of success.
The effectiveness of redundancy depends less on how many copies you have and more on what those copies share.
Do your latency optimization strategies account for correlated slowdowns?
#DistributedSystems #SystemDesign #Networking #TailLatency #PerformanceEngineering