A policy based on a maximum number of consecutive failures.
A policy based on a maximum number of consecutive failures. If numFailures
occur consecutively, checkFailures()
will return a Some(Duration) to
mark an endpoint dead for.
number of consecutive failures
stream of durations to use for the next duration
returned from markDeadOnFailure()
Returns a policy based on an exponentially-weighted moving average success rate over a window of requests.
Returns a policy based on an exponentially-weighted moving average success rate over a window of requests. A moving average is used so the success rate calculation is biased towards more recent requests; for an endpoint with low traffic, the window will span a longer time period and early successes and failures may not accurately reflect the current health.
If the computed weighted success rate is less
than the required success rate, markDeadOnFailure()
will return
Some(Duration).
successRate that must be met
window over which the success rate is tracked. window
requests
must occur for markDeadOnFailure()
to ever return Some(Duration)
stream of durations to use for the next duration
returned from markDeadOnFailure()
com.twitter.finagle.util.Ema for how the success rate is computed
Returns a policy based on an exponentially-weighted moving average success rate over a time window.
Returns a policy based on an exponentially-weighted moving average success rate over a time window. A moving average is used so the success rate calculation is biased towards more recent requests.
If the computed weighted success rate is less
than the required success rate, markDeadOnFailure()
will return
Some(Duration).
successRate that must be met
window over which the success rate is tracked.
markDeadOnFailure()
will return None, until we get requests for a duration
of at least window
.
stream of durations to use for the next duration
returned from markDeadOnFailure()
com.twitter.finagle.util.Ema for how the success rate is computed
Returns a policy based on an exponentially-weighted moving average success rate over a time window.
Returns a policy based on an exponentially-weighted moving average success rate over a time window. A moving average is used so the success rate calculation is biased towards more recent requests.
If the computed weighted success rate is less
than the required success rate, markDeadOnFailure()
will return
Some(Duration).
successRate that must be met
window over which the success rate is tracked.
markDeadOnFailure()
will return None, until we get requests for a duration
of at least window
.
stream of durations to use for the next duration
returned from markDeadOnFailure()
minimum number of requests in the past window
for markDeadOnFailure()
to return a duration
com.twitter.finagle.util.Ema for how the success rate is computed