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
Statistics & Math
Software Engineer
Meta
November 29, 2026
Software Engineer
Phone Screen
Statistics & Math
Easy

0

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
Order statistics
Uniform distribution
Tail latency
Hedged requests
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. 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 Questions
Sample Answer
Clarify

Latencies L1,…,LnL_1, \dots, L_n are iid Uniform(0, 100) ms. We want E[min⁡Li]E[\min L_i] (hedging, first response wins) and E[max⁡Li]E[\max L_i] (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 kkth order statistic of nn uniforms on (0,1) has mean k/(n+1)k/(n+1)....


Submit Your Answer
Markdown supported