Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - andy2046/failured: Adaptive Accrual Failure Detector

Adaptive Accrual Failure Detector. Contribute to andy2046/failured development by creating an account on GitHub.

Visit SiteGitHub - andy2046/failured: Adaptive Accrual Failure Detector

GitHub - andy2046/failured: Adaptive Accrual Failure Detector

Adaptive Accrual Failure Detector. Contribute to andy2046/failured development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

Adaptive Accrual Failure Detector

Documentation GitHub issues license Release


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.

This failure detector is useful for detecting connections failures between nodes in distributed systems.

for documentation, view the API reference

Install

go get github.com/andy2046/failured

Usage

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)
}

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.