Class PhiAccrualFailureDetector
Implementation of 'The Phi Accrual Failure Detector' by Hayashibara et al. as defined in their paper: [http://ddg.jaist.ac.jp/pub/HDY+04.pdf]
The suspicion level of failure is given by a value called φ (phi). The basic idea of the φ failure detector is to express the value of φ on a scale that is dynamically adjusted to reflect current network conditions. A configurable threshold is used to decide if φ is considered to be a failure.
The value of φ is calculated as:
φ = -log10(1 - F(timeSinceLastHeartbeat)
where F is the cumulative distribution function of a normal distribution with mean and standard deviation estimated from historical heartbeat inter-arrival times.
Inherited Members
Namespace: Akka.Remote
Assembly: Akka.Remote.dll
Syntax
public class PhiAccrualFailureDetector : FailureDetector
Constructors
| Improve this Doc View SourcePhiAccrualFailureDetector(Config, EventStream)
Constructor that reads parameters from config. Expecting config properties named 'threshold', 'max-sample-size', 'min-std-deviation', 'acceptable-heartbeat-pause', and 'heartbeat-interval'.
Declaration
public PhiAccrualFailureDetector(Config config, EventStream ev)
Parameters
Type | Name | Description |
---|---|---|
Config | config | The HOCON configuration for the failure detector. |
EventStream | ev | The Akka.Remote.PhiAccrualFailureDetector.EventStream for this ActorSystem. |
PhiAccrualFailureDetector(Clock)
Protected constructor to be used for sub-classing only.
Declaration
protected PhiAccrualFailureDetector(Clock clock)
Parameters
Type | Name | Description |
---|---|---|
Clock | clock | The clock used fo marking time. |
PhiAccrualFailureDetector(Double, Int32, TimeSpan, TimeSpan, TimeSpan, Clock)
Procedural constructor for PhiAccrualDetector
Declaration
public PhiAccrualFailureDetector(double threshold, int maxSampleSize, TimeSpan minStdDeviation, TimeSpan acceptableHeartbeatPause, TimeSpan firstHeartbeatEstimate, Clock clock = null)
Parameters
Type | Name | Description |
---|---|---|
Double | threshold | A low threshold is prone to generate many wrong suspicions but ensures a quick detection in the event of a real crash. Conversely, a high threshold generates fewer mistakes but needs more time to detect actual crashes |
Int32 | maxSampleSize | Number of samples to use for calculation of mean and standard deviation of inter-arrival times. |
TimeSpan | minStdDeviation | Minimum standard deviation to use for the normal distribution used when calculating phi. Too low standard deviation might result in too much sensitivity for sudden, but normal, deviations in heartbeat inter arrival times. |
TimeSpan | acceptableHeartbeatPause | Duration corresponding to number of potentially lost/delayed heartbeats that will be accepted before considering it to be an anomaly. This margin is important to be able to survive sudden, occasional, pauses in heartbeat arrivals, due to for example garbage collect or network drop. |
TimeSpan | firstHeartbeatEstimate | Bootstrap the stats with heartbeats that corresponds to to this duration, with a with rather high standard deviation (since environment is unknown in the beginning) |
Clock | clock | The clock, returning current time in milliseconds, but can be faked for testing purposes. It is only used for measuring intervals (duration). |
Properties
| Improve this Doc View SourceAddress
Address introduced as a mutable property in order to avoid shuffling around API signatures
Declaration
public string Address { get; set; }
Property Value
Type | Description |
---|---|
String |
IsAvailable
TBD
Declaration
public override bool IsAvailable { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceIsMonitoring
TBD
Declaration
public override bool IsMonitoring { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Methods
| Improve this Doc View SourceHeartBeat()
TBD
Declaration
public override void HeartBeat()