An Implementation of Phi Accrual Failure Detector

3 releases (breaking)

0.3.0 Dec 9, 2020
0.2.0 Dec 8, 2020
0.1.0 Dec 7, 2020

#633 in Algorithms

46 downloads per month
Used in lol-core

MIT license

117 lines


Crates.io documentation MIT licensed

This is a Rust implemention of Phi Accrual Failure Detector algorithm which is clearly described in the figure below. Using this algorithm you can detect remote server failure.



This is an implementation of Phi Accrual Failure Detector.

To reduce the memory footprint, pings or intervals aren't actually stored but only two values to calculate normal distribution are maintained. This not only reduces the memory footprint to the constant value but also the computational cost for each ping down to constant.

Why does the memory footprint matter? Think about your application communicates with thousand of remote servers and you want to maintain failure detector for each server. Apparently, it is too wasting to cost 100MB to only for the failure detector.

No runtime deps