What does Fan-Out Tail Latency conclude, in numbers, about “The Page Is a Maximum: Order Statistics and the Last Few Leaves”?

Answer: Chapter 2 writes the page as a maximum and tests independence against the measured table: the independent model puts the ratio of "ninety-five per cent of leaves returned" to "all returned" at 0.087, while the measurement gives 0.500.

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.087, 0.500

leaf lognormal sigma0.9898
one leaf p50/p95/p99 (ms)1.00 5.09 10.00
N rows (99th pct, ms)95% of leaves all leaves
1007.94 39.64
10005.92 68.05
50005.45 95.89
measured Table 1 (99th pct)95% = 70 ms, all = 140 ms
independent ratio 95%/all at N1000: 0.087
measured ratio 70/1400.500
Show the full program
# Chapter 2. p22: time for k of N leaves to finish, independent leaves.
# Model: P(T_(k) <= t) = P(Binomial(N, F(t)) >= k). The leaf law is a
# lognormal fitted to the single-leaf row of Dean and Barroso (2013,
# Table 1): median 1 ms and 99th percentile 10 ms, so sigma = ln 10 /
# z(0.99). The independent prediction for "95% of leaves" and "all
# leaves" is set against the measured 70 ms and 140 ms (99th pct).
import math

Z99 = 2.3263478740408408
SIG = math.log(10.0) / Z99


def leaf_cdf(t):
    if t <= 0.0:
        return 0.0
    return 0.5 * (1.0 + math.erf(math.log(t) / (SIG * math.sqrt(2.0))))


def binom_tail(n, k, x):
    # P(Binomial(n, x) >= k) with log-space terms and math.fsum
    if x <= 0.0:
        return 0.0 if k > 0 else 1.0
    if x >= 1.0:
        return 1.0
    lx, ly = math.log(x), math.log1p(-x)
    terms = []
    for j in range(k, n + 1):
        lc = math.lgamma(n + 1) - math.lgamma(j + 1) - math.lgamma(n - j + 1)
        terms.append(math.exp(lc + j * lx + (n - j) * ly))
    return math.fsum(terms)


def kth_q(q, n, k):
    lo, hi = 1e-6, 1e6
    for _ in range(200):
        mid = math.sqrt(lo * hi)
        if binom_tail(n, k, leaf_cdf(mid)) < q:
            lo = mid
        else:
            hi = mid
    return hi


if __name__ == "__main__":
    print("leaf lognormal sigma = {:.4f}".format(SIG))
    print("one leaf p50/p95/p99 (ms): {:.2f} {:.2f} {:.2f}".format(
        kth_q(0.5, 1, 1), kth_q(0.95, 1, 1), kth_q(0.99, 1, 1)))
    print("     N  rows (99th pct, ms): 95% of leaves   all leaves")
    for n in (100, 1000, 5000):
        k95 = math.ceil(0.95 * n)
        print("  {:5d}                    {:10.2f}   {:10.2f}".format(
            n, kth_q(0.99, n, k95), kth_q(0.99, n, n)))
    print("measured Table 1 (99th pct): 95% = 70 ms, all = 140 ms")
    r = kth_q(0.99, 1000, 950) / kth_q(0.99, 1000, 1000)
    print("independent ratio 95%/all at N=1000: {:.3f}".format(r))
    print("measured ratio 70/140: {:.3f}".format(70 / 140))

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 2: The Page Is a Maximum: Order Statistics and the Last Few Leaves. 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