What does Single-Host Hot Migration and the Ten-Second Contract conclude, in numbers, about “The Ten-Second Stop-the-Bleeding Contract: Convolving the Time Budget, False and Missed Alarms, and the Rot of Rollback Paths”?
Answer: Chapter 6 splits the ten-second contract into three terms: with an automatic decision and a warm old version the 95th percentile is 6.90 seconds, while a cold start meets the budget with probability only 0.0020; probing every second with four failures gives 0.0257 false triggers a month; and a rollback path drilled once a year works with probability only 0.2669.
Scope of the numbers: Examples use fictional names, parameters are illustrative, and all calculations come from the book's programs, which connect to no server. 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.0020, 6.90, 95
| config | P(<=10s) | median | p95 | mean |
| A h2 k2 auto warm | 1.0000 | 5.50 | 6.90 | 5.50 |
| B h5 k3 auto warm | 0.0000 | 16.00 | 18.50 | 16.00 |
| C h4 k2 auto warm | 0.6313 | 9.50 | 11.60 | 9.50 |
| D h2 k2 auto cold | 0.0020 | 17.55 | 25.25 | 18.05 |
| E h2 k2 human warm | 0.0000 | >60 | >60 | >60 |
| F h1 k4 auto warm | 1.0000 | 6.00 | 7.10 | 6.00 |
| grid 0.05 s up to 60 s; budget 10 s |
Show the full program
# Chapter 6. p61: does the stop-the-bleeding path fit in ten seconds?
# Model: total time from a bad release failing to clean traffic is the
# sum of independent parts: detection D uniform on [(k-1)h + t, kh + t]
# (p11); a decision (automatic: 0; a person paged: lognormal, median
# 120 s, spread 0.8); the router flip back, uniform on [0.2, 0.8] s;
# propagation through the shared ingress, uniform on [0, 2] s; and,
# if the old colour was already stopped, a cold start, lognormal with
# median 12 s and spread 0.3 (0 if it was kept warm). Each law is put
# on a 0.05 s grid (mass of [(i - 1/2) dt, (i + 1/2) dt) at i dt) up to
# 60 s and convolved exactly; each output cell is a math.fsum. All
# component laws are illustrative.
import math
DT = 0.05
NB = 1200
def grid(cdf):
edges = [cdf((i - 0.5) * DT) for i in range(NB + 1)]
return [max(0.0, edges[i + 1] - edges[i]) for i in range(NB)]
def uniform(a, b):
return grid(lambda x: min(1.0, max(0.0, (x - a) / (b - a))))
def lognormal(med, s):
def cdf(x):
if x <= 0.0:
return 0.0
z = (math.log(x) - math.log(med)) / s
return 0.5 * (1.0 + math.erf(z / math.sqrt(2.0)))
return grid(cdf)
ZERO = [1.0] + [0.0] * (NB - 1)
def conv(a, b):
nz = [(i, x) for i, x in enumerate(a) if x > 0.0]
return [math.fsum(x * b[k - i] for i, x in nz if i <= k)
for k in range(NB)]
def quantile(p, q):
for i in range(NB):
if math.fsum(p[:i + 1]) >= q:
return "%.2f" % (i * DT)
return ">60"
CONFIGS = (
("A h2 k2 auto warm", 2.0, 2, 1.0, False, False),
("B h5 k3 auto warm", 5.0, 3, 2.0, False, False),
("C h4 k2 auto warm", 4.0, 2, 2.0, False, False),
("D h2 k2 auto cold", 2.0, 2, 1.0, False, True),
("E h2 k2 human warm", 2.0, 2, 1.0, True, False),
("F h1 k4 auto warm", 1.0, 4, 1.0, False, False),
)
FLIP = uniform(0.2, 0.8)
PROP = uniform(0.0, 2.0)
print("%-19s %9s %8s %8s %8s" % ("config", "P(<=10s)", "median",
"p95", "mean"))
for name, h, k, t, human, cold in CONFIGS:
lo = (k - 1) * h + t
p = uniform(lo, lo + h)
for part in (FLIP, PROP,
lognormal(120.0, 0.8) if human else ZERO,
lognormal(12.0, 0.3) if cold else ZERO):
p = conv(p, part)
within = math.fsum(p[:int(round(10.0 / DT)) + 1])
mean = "%.2f" % math.fsum(i * DT * x for i, x in enumerate(p))
if math.fsum(p) < 0.999:
mean = ">60"
print("%-19s %9.4f %8s %8s %8s" % (
name, within, quantile(p, 0.5), quantile(p, 0.95), mean))
print("grid %.2f s up to %.0f s; budget 10 s" % (DT, NB * DT))Single source and citation
Fan, Y. (2026). Zero-Downtime Hot Migration and Rollback on Multi-Container Single Hosts: Lossless Schema Evolution behind a Shared Tunnel and a Ten-Second Stop-the-Bleeding Contract (Version 1.0.0), Chapter 6: The Ten-Second Stop-the-Bleeding Contract: Convolving the Time Budget, False and Missed Alarms, and the Rot of Rollback Paths. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-269 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026269,
author = {Fan, Yafu},
title = {Zero-Downtime Hot Migration and Rollback on Multi-Container Single Hosts: Lossless Schema Evolution behind a Shared Tunnel and a Ten-Second Stop-the-Bleeding Contract},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Blue-Green Is Not Zero Downtime: the Interruption Window Set by Health Checks, Failure Thresholds and Connection Drain
- Chapter 2 · Expand-Contract Migration: the Rollbackability Graph and Pushing Irreversible Steps to the End
- Chapter 3 · The Availability Markov Chain: How Repair Time Eats the Yearly Budget
- Chapter 4 · Many Containers on One Host behind a Shared Tunnel: Common-Cause Failure, Reconnect Backoff and Memory Headroom for Dual Running
- Chapter 5 · Lossless Evolution of a Production Database: Backfill Pace, Dual-Write Verification and the Write-Freeze Window
- Chapter 7 · The Classical Sources Examined: "When a Course Runs Out, Change" and the Ship of Theseus
- Chapter 8 · The Empirical Loop: a Local Drill Checklist, the Hot-Migration Interruption Window Calculator and a Pre-Registered Test