Fastest Replica Latency When Hedging a Feed Request
Last updated: November 29, 2026
Quick Overview
A feed request is sent to n replicas in parallel and the first response wins. If each replica's latency is independent and uniform between 0 and 100 ms, what is the expected latency of the fastest response, and what is the expected latency if you instead had to wait for all n?
Meta
November 29, 20260
0
0 solved
A feed request is sent to n replicas in parallel and the first response wins. If each replica's latency is independent and uniform between 0 and 100 ms, what is the expected latency of the fastest response, and what is the expected latency if you instead had to wait for all n?
Meta infrastructure engineers think constantly about tail latency and hedged requests across replicas. This quick order-statistics question checks whether you can compute expected minimum and maximum of uniforms and connect the result to fan-out design.
What the Interviewer Expects
- Derive $P(\min > t) = (1 - t/100)^n$
- Compute $E[\min] = 100/(n+1)$
- Compute $E[\max] = 100n/(n+1)$
- Explain the diminishing returns of hedging
- Note why fan-out to many backends hurts tail latency
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What if latencies are exponential instead of uniform?
- How many replicas give most of the benefit?
- What is the expected second-fastest latency?
- How does a hedge-after-p95 policy change load?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Latencies are iid Uniform(0, 100) ms. We want (hedging, first response wins) and (fan-out, need all responses)....
Approach
Use the survival function for the minimum and the CDF for the maximum, then integrate. Alternatively use the known result that the th order statistic of uniforms on (0,1) has mean ....