Definition · Service level indicatorA service level indicator is a ratio good ÷ valid of events counted over a stated window. The objective is a target the indicator is compared against. An indicator is not complete without its window and its denominator: “99.95%” names neither, and the same events can produce several different correct values of it.
Everything on this course is a ratio of this shape or a percentile of a sample, and both are measurements. The first thing to do with a measurement is to say how wide it is, because a ratio quoted to four figures from a five-minute window is three of those figures wider than it looks.
Theorem · The standard error of a measured ratioLet each of n valid events be good with probability p, independently. The number of good events has variance n·p(1 − p), so the measured ratio good/n has variance
p(1 − p)/n, and standard error SE = √(p(1 − p)/n).
The variance of a Bernoulli trial, and the rule that the variance of a mean of n independent copies is the variance divided by n, are proved in “Variance and Standard Deviation” on the Discrete Mathematics path. This page uses the result; that page establishes it.
Independence is the assumption and it is the one that fails. Requests that fail because one dependency is down are not independent trials, and during an incident the true error bar is wider than this one — the formula is a floor on the uncertainty, not a description of it. What it is exactly right about is the quiet week, which is when the arguments happen.
a window of n = 1 000 requests reporting 99.95%
p = 9995/10000 = 1999/2000 1 − p = 1/2000
p(1 − p) = 1999/4000000
p(1 − p)/n = 1999/4000000000 exact
SE = √(1999/4000000000) = 0.000706929…
≈ 0.0707% rounded, and it is a root
The variance is an exact fraction and the standard error is not, because a square root of a rational is almost never rational. The lab prints the fraction under the root exactly and labels the root itself as rounded. That is the only rounded figure on this course and its lesson says so.
Now compare the measurement to the objective. The gap is 0.9995 − 0.9990 = 0.0005, which is 0.05%. In units of the error bar that is 0.0005 ÷ 0.000707 = 0.71 — less than one standard error. A window that reports 99.95% against a 99.9% objective has produced a number that a service sitting exactly on the objective would produce routinely.
Example · A window that says 99.95% and settles nothingOne thousand requests, 99.95% good, a 99.9% objective, and a meeting. The measured ratio is above the objective, so the objective was met — except that the same window run again on a service that is exactly at 99.9% would land above 99.95% about a quarter of the time by arithmetic alone. The honest report is “99.95% ± 0.07%, which does not separate us from the objective”. It is a shorter meeting.
How many requests resolve a tenth of a per cent
Turn the formula round. To resolve a difference of w, ask for an error bar of w: set √(p(1 − p)/n) ≤ w and solve for n. A difference worth acting on is usually wanted at two standard errors rather than one, so put half the gap in as w.
want SE ≤ w, so p(1 − p)/n ≤ w², so n ≥ p(1 − p)/w²
gap of 0.05%, wanted at 2 SE: w = 0.00025
n ≥ (1999/4000000) ÷ (1/16000000)
= 1999 × 4
= 7 996 requests
check by search: the smallest n with 2·√(p(1−p)/n) ≤ 0.0005 → 7 996
Two routes to one integer, which is the check: the closed form and an exact scan over n agree on 7 996. At a hundred requests a second that is eighty seconds, which is a useful thing to know before anyone proposes a five-minute window as the unit an objective is judged in.
The 1/√n is not specific to measurement. Estimating a quantity by running a simulation many times has exactly the same error bar for exactly the same reason, which is what “Monte Carlo Estimation and the Standard Error” on the Operations Research path is about: four times the runs for twice the precision, whether the trials are simulated or served. No tail inequality is needed on this page — Markov and Chebyshev, which bound a deviation without knowing the distribution, are “From Expectation to Probability” on the Algorithms path, and here the distribution is known.
What the error bar does not cover
It covers sampling noise and nothing else. A denominator that silently excludes the requests that never reached the load balancer produces a ratio that is biased, not noisy, and doubling the window makes it more precisely wrong. The same is true of a window whose boundary falls in the middle of an incident, of retries counted as separate valid events, and of a client-side timeout the server never saw. Systematic error has no √n in it, and the only defence is writing down what the denominator is.