Skip to content

PhiAccrualFailureDetector

Defined in: src/cluster/PhiAccrualFailureDetector.ts:51

Phi-accrual failure detector (Hayashibara et al, “The Phi Accrual Failure Detector”, 2004). Tracks the distribution of recent inter-arrival times and produces a continuous suspicion value phi; the cluster converts phi to unreachable/down by threshold.

Compared to the simple time-threshold FailureDetector, this adapts to actual network conditions — a chatty LAN peer can be flagged sooner, a jittery mobile peer gets more slack.

new PhiAccrualFailureDetector(settings?): PhiAccrualFailureDetector

Defined in: src/cluster/PhiAccrualFailureDetector.ts:55

Partial<PhiAccrualSettings> = {}

PhiAccrualFailureDetector

get interval(): number

Defined in: src/cluster/PhiAccrualFailureDetector.ts:65

number

decide(peer, now?): FailureDecision

Defined in: src/cluster/PhiAccrualFailureDetector.ts:124

NodeAddress

number = ...

FailureDecision


forget(peer): void

Defined in: src/cluster/PhiAccrualFailureDetector.ts:131

NodeAddress

void


heartbeat(peer, now?): void

Defined in: src/cluster/PhiAccrualFailureDetector.ts:82

Record a received heartbeat for peer at time now.

NodeAddress

number = ...

void


lastSeen(peer): Option<number>

Defined in: src/cluster/PhiAccrualFailureDetector.ts:133

NodeAddress

Option<number>


phi(peer, now?): number

Defined in: src/cluster/PhiAccrualFailureDetector.ts:105

Current phi value for peer — the higher, the more suspicious.

NodeAddress

number = ...

number


register(peer, _now?): void

Defined in: src/cluster/PhiAccrualFailureDetector.ts:68

Peer is now known. No sample added until the first heartbeat.

NodeAddress

number = ...

void