Skip to content

Research notes / Distributed storage

Phi failure detectors: suspicion is not a failure probability

Published 17 October 2026 / Updated 16 November 2026 / Source review and analytic examples

A phi score measures how surprising a missing heartbeat is under an arrival-time model. It does not, by itself, tell you the probability that a node has failed. Nor does a decision to stop routing requests revoke that node's ability to write.

On this page11 sections

A score and a decision are separate

The 2004 JAIST report separates a continuously valued suspicion signal from an application's action threshold. It defines phi as the negative base-10 logarithm of the model's probability of a later heartbeat. Its implementation fits a normal distribution to recent arrival intervals. [1, section IV]

phi(d) = -log10 S(d)

Here d is time since the last observed heartbeat, not a disk command's latency; S(d) is the assumed inter-arrival survival function. A modeled tail of 0.001 gives phi 3. This identity does not supply a failure prior, an application-health test or a measured false-alarm rate.

In Cassandra's documented architecture, UP/DOWN decisions are local to each observer. A conviction changes request routing; it is not automatic removal of the endpoint from membership. Different observers can therefore require different incident explanations. [3]

Cassandra 5.0.0 does not use that normal tail

In the pinned source, ArrivalWindow.phi() returns elapsed time divided by the sampled mean. The threshold comparison multiplies that raw ratio by 1 / ln(10); the JMX PHI values apply the same factor. The resulting score is d / (mean * ln(10)), algebraically the negative log-tail of an exponential model. [2]

The implementation also seeds its window, filters arrival intervals and suppresses convictions around detected local pauses. Those details matter: the formula alone is not the running detector. Raw diagnostic values and scaled JMX scores should not be compared as if they had identical units. [2, report, interpret, ArrivalWindow and getPhiValues]

This is a version-pinned source reading, not a statement that all Cassandra releases or all phi detectors behave identically. We did not run a Cassandra cluster.

The same silence can produce very different scores

Hesela's calculation fixes an invented mean interval of one second. The normal approximation has an invented standard deviation of 0.1 seconds; the exponential model has the same mean but a different spread. We do not fit either model to observations or claim equal variances.

Analytic examples, not telemetry. Normal and exponential phi scores are dimensionless; elapsed silence is in seconds. Display rounded to four decimals.
Silence (s)Normal phiExponential phi
1.00.30100.4343
1.21.64300.5212
1.56.54260.6514
2.023.11810.8686

At 1.5 seconds the normal example exceeds phi 6, while the exponential example remains below 1. This is not evidence that one detector is better. It is evidence that a threshold has meaning only with its model, estimated parameters and implementation. Copying a numeric threshold between systems does not preserve an alert policy.

The calculation uses an untruncated normal approximation, which mathematically permits negative intervals. With these illustrative parameters its negative tail is tiny, but this is still an approximation, not a physical arrival generator. The code computes the upper tail directly with erfc to avoid subtracting a near-one cumulative probability.

The missing input is the failure prior

Consider a separate hypothetical experiment: at the start of an observation interval a node is either failed or alive. Let its prior failure probability be p; assume a failed node cannot produce the next observed heartbeat. Let s = 0.001 be the probability of no heartbeat by the evaluation time when alive. Bayes' rule gives:

P(failed | no heartbeat) = p / (p + (1 - p) * s)

Two invented priors, the same alive-tail probability of 0.001, and the same phi score of 3. No failure frequency was measured.
Hypothetical priorConditional failure probability
0.01%9.09%
1.00%90.99%

Exact conditional probabilities, in row order: 1000/10999 and 1000/1099.

One phi score is compatible with both results because it did not encode the prior. Real systems also need to account for when failures can occur and whether already-sent heartbeats can arrive after a failure. Our deliberately simple example omits those mechanisms. Neither row is an estimate for a production fleet.

A fitted tail is not a validated rare-event frequency

A model can return phi 8 after fitting a small window. That is a modeled tail of 10^-8, not evidence that only one in a hundred million observed intervals crosses the corresponding delay. The report used a default window of 1,000 samples to fit its detector; that window is not an independent validation set. [1, section V-A]

For a separate, deliberately simplified validation design, freeze a delay threshold using training data, then observe n independent, complete intervals from a process known to remain alive. The event is an interval exceeding that delay. Fix n before seeing outcomes and assume one common event probability q. With zero exceedances, P(X = 0) = (1 - q)^n. Inverting at alpha 0.05 gives the exact one-sided 95% binomial upper bound below. This applies the binomial method documented by NIST to our stated event. [4]

q_upper = 1 - 0.05^(1/n)

Hypothetical validation samples with zero exceedances. Bounds are probabilities per complete interval, not rates per second or node-failure probabilities.
Independent intervals95% upper bound
1002.951305e-2
1,0002.991250e-3
10,0002.995284e-4
1,000,0002.995728e-6

Even zero events in 1,000 validation intervals only gives an upper bound of about 0.003. The sample-size calculation for an upper bound at most q_target is:

n_min = ceil(ln(0.05) / ln(1 - q_target))

Planned sample sizes, conditional on observing zero events. A phi label here denotes only its target model tail, not a recommended detector setting.
Phi labelTarget tailMinimum intervals
31e-32,995
61e-62,995,731
81e-8299,573,226

This is a limit of this zero-event validation design, not a theorem that every useful detector needs that many samples. A parametric tail can extrapolate, but the extrapolation needs justification beyond an empty tail count. The interval is a frequentist coverage statement under the assumptions, not a 95% posterior probability about this particular bound.

Do not count every poll during the same silent interval as a new independent trial. Changing thresholds, overlapping windows, shared pauses, loss bursts and missing interval outcomes can invalidate this simple binomial calculation. Stopping as soon as the result looks satisfactory also changes the design. Real deployments need an observation protocol that addresses these effects; these examples do not certify Cassandra or reproduce the paper.

The generator uses expm1 and log1p to retain small probabilities. Tests check the defining equation and independently verify sample-size minimality with high-precision decimal arithmetic.

Count episodes, elapsed time and tail events separately

The paper defines an average mistake rate and plots it in inverse seconds. That quantity is not the dimensionless tail used to compute phi. [1, section II-B and figure 8]

For an operational record, define a false-suspicion episode as an entry into a suspected state while the monitored process is independently known to be alive. Count each episode once. Report episodes divided by eligible alive-observation time, and separately the fraction of that time spent wrongly suspected. State observer, workload, gaps and labeling method; a later heartbeat alone is not proof that no crash and restart occurred.

Two invented, nonoverlapping episode records: ten false-suspicion episodes in 1,000 seconds of known-alive observation. Same episode rate, different disruption duration.
Each episode (s)Episodes per secondTime wrongly suspected
10.011%
500.0150%

A one-percent interval-exceedance probability, 0.01 episodes per second and one percent of time wrongly suspected are three different quantities. None can be substituted for the others without an explicit timing and decision model. The mistake-rate definition makes that unit boundary available in the corpus.

From heartbeat intervals to time spent suspected

Equal tail probabilities need not mean equal disruption time, even at the same mean heartbeat interval. Consider a fixed delay threshold tau, a process known to remain alive, continuous observation and an immediate reset at every arrival. An interval of length T > tau contributes one episode and T - tau seconds of suspicion. At exact equality, our convention counts no positive-duration episode.

For a complete finite record, divide the number of exceeding intervals by the number of intervals to obtain the exceedance fraction. Divide that same count by total seconds for the episode rate. Divide the sum of max(T - tau, 0) by total seconds for the time fraction. These are exact accounting identities; they require neither independence nor a fitted distribution.

Invented complete records, not telemetry. Each has 100 intervals, 110 seconds in total, a mean of 1.1 seconds and a fixed 2-second threshold. No crashes occur.
Intervals in cohortExceeding intervalsEpisodes per secondSeconds suspectedTime suspected
A: 99 x 1 s; 1 x 11 s1/1001/11099/110 (8.18%)
B: 99 x 10/11 s; 1 x 20 s1/1001/110189/55 (16.36%)

Both records have one exceeding interval in 100 and one episode in 110 seconds. Yet B spends 18 seconds suspected versus A's 9 seconds: twice the time burden. Shortening B's 99 other intervals preserves total exposure. This constructed example isolates duration beyond the threshold; it does not estimate any network's behavior.

For an idealized renewal model with positive, independent and identically distributed intervals and finite mean mu = E[T], renewal-reward theory supplies the long-run versions. Use reward 1(T > tau) for episodes and reward max(T - tau, 0) for suspected time. The latter accumulates nonnegatively and is bounded by the interval length, satisfying the relevant integrability and partial-reward conditions. This is Hesela's application of the theorem, not a result measured in the phi paper. [5, theorem 1 and Partial Rewards]

episode rate = P(T > tau) / E[T]
time fraction = E[max(T - tau, 0)] / E[T]

Equivalently, the time fraction is the integral of the survival tail from tau to infinity, divided by mu. For exponential intervals, this expression reduces to the tail at tau; this is not a general identity. That equality is a property of the idealized exponential model, not evidence that Cassandra's measured time burden equals its modeled tail. The renewal strong law explains the conversion from cycles to elapsed time. [6, slides 6-9]

Rolling fits, pause suppression, hysteresis and polling delays change the decision rule. A recording that starts or stops inside an interval also needs explicit boundary handling: silently dropping an unfinished long gap can omit its already-observed suspicion time. The cohort calculations above cover complete intervals only; they are not a detector benchmark, confidence interval or threshold recommendation.

Keep the observed part of an unfinished gap. In a separate synthetic record, a heartbeat arrives at time 0, then at 1 and 2 seconds; observation ends at 5 seconds. The process is independently stipulated alive throughout. With a fixed 2-second delay threshold, suspicion occupies the time after 4 seconds until the window ends: 1 second, or 1/5 of eligible observation time. There is 1 observed onset. Keeping only the two completed one-second gaps would report zero suspicion. No future heartbeat is assumed.

The runnable observed_window calculation clips time to [0, end) and requires a known initial age since the last heartbeat. It counts a threshold crossing at or after zero only if positive-duration suspicion follows before an arrival or the right edge. Equality at an arrival or the right edge adds no episode. If the initial age equals the threshold, an onset immediately after zero is counted when positive duration follows.

Already-suspected state at the left edge contributes time but no new onset. For example, initial age 3 seconds, threshold 2 seconds and a 1-second window without arrivals yield 1 second suspected and 0 new onsets. Unknown initial age must not be replaced by zero; obtain prior history or begin a new eligible window at a known heartbeat. Missing observation periods require separate treatment. The program cannot infer that a process stayed alive from silence or a later heartbeat.

Weight time, not dashboard refreshes. As an operational consequence of this accounting, an unweighted fraction of dashboard samples marked suspected is not generally the fraction of elapsed time suspected. Irregular sampling can overrepresent busy alarm periods, and periodic polling can miss short episodes between checks. Integrate recorded state durations over eligible time; when only snapshots exist, disclose the sampling and interpolation assumptions instead of calling the result exact. This is a measurement implication of the time integral, not an additional result from the heartbeat experiment. [5, Examples 2-3]

Reproduce this separate example with renewal.py, its tests and exact rational JSON. Run python3 -B renewal.py --check and python3 -B -m unittest test_renewal.py together with the downloaded files. Original model results above are unchanged.

Perfect and eventually perfect describe different contracts

Chandra and Toueg classify detector histories by completeness and accuracy in a crash-stop model. A correct process never crashes during the modeled run; a crashed process does not restart. Strong completeness requires every crashed process eventually to remain suspected by every correct process. This is a qualitative guarantee, not a measured detection deadline. [7, sections 2.1-2.4]

A perfect failure detector, class P, adds strong accuracy: no process is suspected before it crashes, including a process that crashes later. An eventually perfect failure detector, class diamond-P, instead allows initial false suspicions; after some finite time, correct processes are never suspected by correct processes. That time is not necessarily known to the application. [7, section 2.3 and Figure 1]

The paper constructs an eventually perfect detector using heartbeats and increasing timeouts under eventual bounds on relative process speeds and message transmission. The timing assumptions are part of the result. Partial synchrony distinguishes unknown bounds from bounds that begin to hold after an unknown stabilization time; neither gives a client a completion deadline. [7, section 9] [8, sections 1.2-1.3]

The measurement consequence is important: a finite clean trace, a low observed mistake rate or a chosen phi threshold cannot establish an all-future-time accuracy property. Nor does either class certify disk health, recover a restarted process or enforce fencing. Keep the observed error metrics above, the protocol's stated assumptions and the stale-writer controls below as separate evidence.

For a hypothetical counterexample, suppose a never-crashing observer wrongly suspects another never-crashing process once and never clears that suspicion. One onset divided by growing observation time tends to zero, yet the process remains wrongly suspected forever: eventual strong accuracy fails. This is a logical example, not heartbeat telemetry, and shows why episode rate alone cannot establish class membership.

Suspicion does not fence a stale writer

Hesela's design implication: record detection, recovery policy and enforcement as separate events. A membership observer can stop selecting a replica while an old request still exists elsewhere. A high score neither cancels that request nor proves that its write was absent.

Use the existing analyses of storage fencing and stale writes and timeouts and uncertain completion for those different boundaries. A healthy heartbeat is also narrower than a healthy storage workload; see observer-relative failures.

What was checked

The report's evaluation replayed a week of UDP heartbeat observations between Switzerland and Japan. Neither monitored machine crashed. Detection time was estimated under an assumed crash timing, not measured from a population of failed storage nodes. This limits extrapolation to today's clusters. [1, section V]

Our contribution is the explicit model comparison, Bayesian counterexample, hypothetical validation bounds and complete-record versus observation-window accounting above. There are no sampled devices or benchmark runs. The confidence bounds are analytic examples with stated assumptions, not intervals estimated from real heartbeat measurements. A real evaluation would need labeled incidents, observation intervals, pauses, losses, model calibration and costs of incorrect suspicions.

Reproduce the numbers with model.py, run the tests, or inspect full-precision JSON. In one directory run python3 -B model.py, then python3 -B -m unittest discover -v. Original code and synthetic results are CC0; cited publications retain their own rights.

Definitions: failure detector and phi accrual failure detector.

Primary sources

  1. Hayashibara, Defago, Yared and Katayama, The phi accrual failure detector, JAIST IS-RR-2004-010 (10 May 2004), sections II-B, IV-V.
  2. Apache Cassandra 5.0.0: FailureDetector.java, ArrivalWindow.phi, interpret and getPhiValues.
  3. Apache Cassandra documentation: Dynamo, Ring Membership and Failure Detection (reviewed 17 October 2026).
  4. NIST Dataplot: Exact binomial confidence limits, including the one-sided convention.
  5. Maria Vlasiou, Renewal Processes with Costs and Rewards, arXiv:1404.5601v1, theorem 1 and Partial Rewards.
  6. Robert Gallager, MIT 6.262, Lecture 11: Renewals, Strong Law and Rewards (9 March 2011), slides 6-9.
  7. Chandra and Toueg. Unreliable Failure Detectors for Reliable Distributed Systems. JACM 43(2), 225-267, 1996; sections 2.1-2.4 and 9.
  8. Dwork, Lynch and Stockmeyer. Consensus in the Presence of Partial Synchrony. JACM 35(2), 288-323, 1988; sections 1.2-1.3 and 2.3.

Model sources reviewed 17 October 2026; validation method rechecked 19 October 2026; renewal-time extension and report rechecked 7 November 2026. Detector-class sources reviewed 16 November 2026. Source [1] is the JAIST technical report, not an asserted identical conference edition. No unverified DOI, cluster experiment, universal threshold or measured SEO benefit is claimed.

Published by Hesela team · Published · Updated

Report a correction · Editorial standards · Reuse guidance

Change history

: first published.

  1. · Update: Added exact complete-interval and observation-window accounting, separating heartbeat tail frequency, episode rate and time suspected; included unfinished gaps, carried-in suspicion and reproducible examples.
  2. · Update: Added conditional zero-exceedance validation bounds and minimum sample sizes; distinguished false-suspicion frequency from duration; fixed intermediate overflow in the public exponential-score calculation.

: latest recorded update. A detailed change note is not available for this revision.

New-publication RSS · Correction RSS

Cite this page
Hesela team. Phi failure detectors: suspicion is not a failure probability. Hesela. 2026-11-16. https://hesela.com/analyses/phi-failure-detectors-suspicion/