What does Fan-Out Tail Latency conclude, in numbers, about “Budget Allocation: Splitting a Page Percentile Across Every Call”?

Answer: Chapter 6 splits the page budget across calls, and splitting it unequally by cost saves 0.0597 of the capacity cost.

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.0597

class n cost k equal share optimal share
cache60 1.0 0.000100 0.000032
db30 4.0 0.000100 0.000130
search9 10.0 0.000100 0.000324
partner1 40.0 0.000100 0.001295
capacity cost, equal split14.2683
capacity cost, optimal split13.4164
saving0.0597 of the equal-split cost
check P(page meets B)0.990000
Show the full program
# Chapter 6. p62: unequal split of the slow share by marginal cost.
# Model (illustrative): four classes of calls in one page, n_i calls
# each, all with deadline B = 200 ms. Holding class i to slow share e_i
# needs a rate gap g_i = ln(1/e_i)/B per server at cost k_i per unit
# gap. Minimise sum n_i k_i g_i subject to
#   sum n_i (-ln(1 - e_i)) = -ln(0.99)   (page meets B with 0.99).
# Lagrange: e_i / (1 - e_i) = k_i / (nu B); nu found by bisection.
import math

B = 200.0
CLASSES = (("cache", 60, 1.0), ("db", 30, 4.0), ("search", 9, 10.0),
           ("partner", 1, 40.0))
BUDGET = -math.log(0.99)


def used(nu):
    terms = []
    for _, n, k in CLASSES:
        x = k / (nu * B)
        e = x / (1.0 + x)
        terms.append(-n * math.log1p(-e))
    return math.fsum(terms)


def cost(eps):
    return math.fsum(n * k * math.log(1.0 / e) / B
                     for (_, n, k), e in zip(CLASSES, eps))


if __name__ == "__main__":
    lo, hi = 1e-6, 1e9
    for _ in range(300):
        mid = math.sqrt(lo * hi)
        if used(mid) > BUDGET:
            lo = mid
        else:
            hi = mid
    nu = hi
    opt = [(k / (nu * B)) / (1.0 + k / (nu * B)) for _, _, k in CLASSES]
    total_n = math.fsum(n for _, n, _ in CLASSES)
    eq = -math.expm1(math.log(0.99) / total_n)
    print("class      n    cost k   equal share   optimal share")
    for (name, n, k), e in zip(CLASSES, opt):
        print("  {:<8} {:3d}   {:6.1f}    {:.6f}      {:.6f}".format(
            name, n, k, eq, e))
    c_eq, c_opt = cost([eq] * len(CLASSES)), cost(opt)
    print("capacity cost, equal split:   {:.4f}".format(c_eq))
    print("capacity cost, optimal split: {:.4f}".format(c_opt))
    print("saving: {:.4f} of the equal-split cost".format(1.0 - c_opt / c_eq))
    chk = math.fsum(-n * math.log1p(-e) for (_, n, _), e in
                    zip(CLASSES, opt))
    print("check P(page meets B) = {:.6f}".format(math.exp(-chk)))

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 6: Budget Allocation: Splitting a Page Percentile Across Every Call. 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