https://github.com/samueleresca/phi-accrual-failure-detector
Phi φ Accrual Failure Detector implementation in Python, see: https://samueleresca.net/detecting-node-failures-and-the-phi-accrual-failure-detector/
https://github.com/samueleresca/phi-accrual-failure-detector
accrual-failure-detector distributed-systems fault-detection fault-tolerance fault-tolerant
Last synced: 2 months ago
JSON representation
Phi φ Accrual Failure Detector implementation in Python, see: https://samueleresca.net/detecting-node-failures-and-the-phi-accrual-failure-detector/
- Host: GitHub
- URL: https://github.com/samueleresca/phi-accrual-failure-detector
- Owner: samueleresca
- License: mit
- Created: 2021-03-14T10:50:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-07T16:37:53.000Z (about 4 years ago)
- Last Synced: 2025-04-05T15:02:59.755Z (3 months ago)
- Topics: accrual-failure-detector, distributed-systems, fault-detection, fault-tolerance, fault-tolerant
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phi-accrual-failure-detector
[](https://github.com/samueleresca/phi-accrual-failure-detector/actions/workflows/tests.yml)
[](https://codecov.io/gh/samueleresca/phi-accrual-failure-detector)A python port of
the [Akka's (φ) Accrual failure detector implementation](https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/PhiAccrualFailureDetector.scala)
.A in-depth description is available [here](https://samueleresca.net/detecting-node-failures-and-the-phi-accrual-failure-detector/).
## Getting started
You can import the library into the project using:
```shell
pip install py-accrual-failure-detector
```You can use the package as follows:
```python
from phi_accrual_failure_detector import PhiAccrualFailureDetectorfailure_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 heartbeatnode_is_available = failure_detector.is_available()
```## References
[The ϕ Accrual Failure Detector - Naohiro Hayashibara, Xavier Défago, Rami Yared and Takuya Katayama](https://ieeexplore.ieee.org/document/1353004)
[Cassandra - A Decentralized Structured Storage System](https://www.cs.cornell.edu/projects/ladis2009/papers/lakshman-ladis2009.pdf)
[Phi Accrual Failure Detector - Akka documentation](https://doc.akka.io/docs/akka/current/typed/failure-detector.html)
[akka/akka source code](https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/PhiAccrualFailureDetector.scala)
[A logistic approximation to the cumulative normal distribution](https://core.ac.uk/display/41787448)