PhiAccrualFailureDetector Constructor (Double, Int32, TimeSpan, TimeSpan, TimeSpan, Clock)
Procedural constructor for PhiAccrualDetector
Namespace:
Akka.RemoteAssembly: Akka.Remote (in Akka.Remote.dll)
Syntax
public PhiAccrualFailureDetector( double threshold, int maxSampleSize, TimeSpan minStdDeviation, TimeSpan acceptableHeartbeatPause, TimeSpan firstHeartbeatEstimate, Clock clock )
Parameters
- threshold
- Type: Double
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
- maxSampleSize
- Type: Int32
Number of samples to use for calculation of mean and standard deviation of inter-arrival times.
- minStdDeviation
- Type: TimeSpan
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.
- acceptableHeartbeatPause
- Type: TimeSpan
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.
- firstHeartbeatEstimate
- Type: TimeSpan
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
- Type: Akka.Remote..::..Clock
The clock, returning current time in milliseconds, but can be faked for testing purposes. It is only used for measuring intervals (duration).