https://github.com/andy2046/failured
Adaptive Accrual Failure Detector
https://github.com/andy2046/failured
accrual-failure-detector adaptive failure-detection
Last synced: 4 months ago
JSON representation
Adaptive Accrual Failure Detector
- Host: GitHub
- URL: https://github.com/andy2046/failured
- Owner: andy2046
- License: bsd-3-clause
- Created: 2021-07-26T10:11:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-02T03:08:02.000Z (over 4 years ago)
- Last Synced: 2025-04-13T00:14:56.990Z (8 months ago)
- Topics: accrual-failure-detector, adaptive, failure-detection
- Language: Go
- Homepage: https://github.com/andy2046/failured
- Size: 29.3 KB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-cn - failured
- awesome-go-plus - failured - adaptive accrual failure detector for distributed systems.  (Distributed Systems / Search and Analytic Databases)
- awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- awesome-go-extra - failured - 07-26T10:11:01Z|2021-08-02T03:08:02Z| (Distributed Systems / Advanced Console UIs)
- awesome-go-with-stars - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- fucking-awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
- awesome-go-cn - failured
- awesome-go - failured - adaptive accrual failure detector for distributed systems. (Distributed Systems / Search and Analytic Databases)
README
# Adaptive Accrual Failure Detector
[](http://godoc.org/github.com/andy2046/failured)
[](https://github.com/andy2046/failured/issues)
[](https://github.com/andy2046/failured/LICENSE)
[](https://github.com/andy2046/failured/releases)
----
## There is NO perfect failure detector.
## It's a trade-off between completeness and accuracy.
## Failure detection is not a binary value.
This is an implementation of a failure detector that uses
an adaptive accrual algorithm. The theory of this failure detector is taken from the paper
[A New Adaptive Accrual Failure Detector for Dependable Distributed Systems](https://dl.acm.org/citation.cfm?id=1244129).
This failure detector is useful for detecting connections failures between nodes in distributed systems.
for documentation, view the [API reference](./doc.md)
## Install
```
go get github.com/andy2046/failured
```
## Usage
```go
package main
import (
"time"
"github.com/andy2046/failured"
)
func main() {
fd := failured.New()
closer := make(chan struct{})
// call RegisterHeartbeat every second
go func() {
for {
select {
case <-closer:
return
default:
}
time.Sleep(time.Second)
fd.RegisterHeartbeat()
}
}()
time.Sleep(3 * time.Second)
close(closer)
// check FailureProbability
p := fd.FailureProbability()
println("failure probability is", p)
}
```