A python port of the Akka's (φ) Accrual failure detector implementation .
A in-depth description is available here.
You can import the library into the project using:
pip install py-accrual-failure-detector
You can use the package as follows:
from phi_accrual_failure_detector import PhiAccrualFailureDetector
failure_detector = PhiAccrualFailureDetector(
threshold=3,
max_sample_size=1000,
min_std_deviation_ms=10,
acceptable_heartbeat_pause_ms=0,
first_heartbeat_estimate_ms=1000
)
failure_detector.heartbeat() # sends an heartbeat
failure_detector.heartbeat() # sends an heartbeat
failure_detector.heartbeat() # sends an heartbeat
node_is_available = failure_detector.is_available()
The ϕ Accrual Failure Detector - Naohiro Hayashibara, Xavier Défago, Rami Yared and Takuya Katayama
Cassandra - A Decentralized Structured Storage System
Phi Accrual Failure Detector - Akka documentation
A logistic approximation to the cumulative normal distribution