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 | |
| cache | 60 1.0 0.000100 0.000032 |
| db | 30 4.0 0.000100 0.000130 |
| search | 9 10.0 0.000100 0.000324 |
| partner | 1 40.0 0.000100 0.001295 |
| capacity cost, equal split | 14.2683 |
| capacity cost, optimal split | 13.4164 |
| saving | 0.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
- Chapter 1 · The Multiplicative Law: How One Slow Call in a Hundred Becomes Sixty-Three Slow Pages in a Hundred
- Chapter 2 · The Page Is a Maximum: Order Statistics and the Last Few Leaves
- Chapter 3 · When Independence Fails: Correlated Slowness, Bad Machines and Synchronised Background Work
- Chapter 4 · Hedged Requests: Sending a Second Copy at the 95th Percentile
- Chapter 5 · Queueing Tails: Utilisation Stretches the Tail, and Hedges Are Load Too
- Chapter 7 · The Classics East and West: Half the Journey at Ninety, and the Law of the Minimum
- Chapter 8 · A Fan-Out Audit of a Paid Web Service, and a Plan for Refutation