What does Fan-Out Tail Latency conclude, in numbers, about “Hedged Requests: Sending a Second Copy at the 95th Percentile”?

Answer: Chapter 4 covers hedged requests: sending a second copy at the single call's 95th percentile adds 0.0500 extra requests and cuts the page miss probability to 0.0100; when slowness lies in the request itself, hedging fails.

Scope of the numbers: Service times, slow shares and costs are illustrative; all calculations are generated by the book's programs; the book is general business analysis, not individualised business advice. Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.0100, 0.0500, 95

hedge delay d = leaf p9511.63 ms
extra requests S(d)0.0500
percentile no hedge (ms) hedged (ms)
504.1 4.1
9511.6 11.6
9815.8 14.4
99.51346.6 17.2
99.92151.3 21.3
P(call > 1000 ms)0.010000 -> 0.000100
P(page of 100 > 1000 ms), no hedge0.6340
P(page of 100 > 1000 ms), hedged0.0100
Show the full program
# Chapter 4. p41: a hedged request fired at the 95th percentile.
# Leaf law (illustrative, as p13): 0.99 fast 2 ms + Exp(3 ms), 0.01 slow
# 1000 ms + Exp(500 ms). Hedge: if the first copy has not answered by d,
# send a second copy to another replica and keep the first answer:
#   T = min(X1, d + X2),  P(T > t) = S(t) S(t - d) for t >= d,
# with independent replicas. Extra requests = S(d). Page of N = 100.
import math

P_SLOW, FA, FM, SA, SM = 0.01, 2.0, 3.0, 1000.0, 500.0


def sf_exp(t, a, m):
    return 1.0 if t < a else math.exp(-(t - a) / m)


def sf(t):
    return (1.0 - P_SLOW) * sf_exp(t, FA, FM) + P_SLOW * sf_exp(t, SA, SM)


def sf_hedge(t, d):
    return sf(t) if t < d else sf(t) * sf(t - d)


def quantile(surv, q):
    lo, hi = 0.0, 50000.0
    for _ in range(100):
        mid = 0.5 * (lo + hi)
        if surv(mid) >= 1.0 - q:
            lo = mid
        else:
            hi = mid
    return hi


if __name__ == "__main__":
    d = quantile(sf, 0.95)
    print("hedge delay d = leaf p95 = {:.2f} ms".format(d))
    print("extra requests S(d) = {:.4f}".format(sf(d)))
    print("percentile   no hedge (ms)   hedged (ms)")
    for q, lab in ((0.5, "50"), (0.95, "95"), (0.98, "98"),
                   (0.995, "99.5"), (0.999, "99.9")):
        print("  {:<6}    {:10.1f}     {:10.1f}".format(
            lab, quantile(sf, q), quantile(lambda t: sf_hedge(t, d), q)))
    s0, s1 = sf(1000.0), sf_hedge(1000.0, d)
    print("P(call > 1000 ms): {:.6f} -> {:.6f}".format(s0, s1))
    for lab, s in (("no hedge", s0), ("hedged  ", s1)):
        pg = -math.expm1(100 * math.log1p(-s))
        print("P(page of 100 > 1000 ms), {}: {:.4f}".format(lab, pg))

Single source and citation

Fan, Y. (2026). The Multiplicative Law of Fan-Out Tail Latency and Hedged Requests: How Percentile Latency Amplifies When One Page Makes Many Calls (Version 1.0.0), Chapter 4: Hedged Requests: Sending a Second Copy at the 95th Percentile. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-326 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026326,
  author    = {Fan, Yafu},
  title     = {The Multiplicative Law of Fan-Out Tail Latency and Hedged Requests: How Percentile Latency Amplifies When One Page Makes Many Calls},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book