pub struct PassiveHealth {
pub window_ms: u64,
pub consecutive_failures: u32,
pub failure_ratio: f64,
pub failure_min_volume: u32,
pub eject_ms: u64,
pub half_open_probes: u32,
pub recovery_ramp_ms: u64,
pub body_completion_inflight: bool,
}Expand description
Passive health / outlier detection knobs (DW-012). All fields default;
a health: block with no keys enables ejection with the defaults.
Failure classification: transport errors (connect timeout, refusal, reset) and HTTP statuses >= 500 are failures; 1xx-4xx are successes. 429/408 are deliberately successes in v1 (they describe the caller or queueing, not endpoint health).
Fields§
§window_ms: u64Rolling observation window for the failure ratio, in milliseconds (default 60000).
consecutive_failures: u32Eject after this many consecutive failures (default 5).
failure_ratio: f64Eject when the in-window failure share is >= this ratio AND volume
is >= failure_min_volume. Must be in (0, 1] (default 0.5).
failure_min_volume: u32Minimum observations in the window before failure_ratio applies
(default 20).
eject_ms: u64How long an ejected endpoint stays out of rotation, in milliseconds (default 30000).
half_open_probes: u32Trial requests allowed through per half-open recovery attempt
(default 1). A successful probe restores health; a failed probe
re-ejects for another eject_ms.
recovery_ramp_ms: u64Recovery ramp window in milliseconds (REL-06, #217). When > 0, an endpoint that recovers from ejection (a half-open probe succeeds) does NOT immediately return to full traffic. Instead it ramps its effective weight from a floor (1) to its configured weight over this window, reducing the blast radius of a partial recovery (the endpoint may still be slow or partially degraded). Default 0 = no ramp (v1 behavior: a successful probe restores full weight immediately).
body_completion_inflight: boolWhether the in-flight counter is held until the response body
completes (REL-06, #217). Default false: the in-flight counter
is released when response headers resolve (v1 behavior). When
true, the counter is held until the body stream ends or is
dropped, giving least_requests, random, and peak_ewma a
more accurate view of actual endpoint load. The trade-off is a
slightly higher in-flight count under streaming workloads.
Trait Implementations§
Source§impl Clone for PassiveHealth
impl Clone for PassiveHealth
Source§fn clone(&self) -> PassiveHealth
fn clone(&self) -> PassiveHealth
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PassiveHealth
impl Debug for PassiveHealth
Source§impl Default for PassiveHealth
impl Default for PassiveHealth
Source§impl<'de> Deserialize<'de> for PassiveHealth
impl<'de> Deserialize<'de> for PassiveHealth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PassiveHealth
impl JsonSchema for PassiveHealth
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PassiveHealth
impl PartialEq for PassiveHealth
Source§impl Serialize for PassiveHealth
impl Serialize for PassiveHealth
impl Copy for PassiveHealth
impl StructuralPartialEq for PassiveHealth
Auto Trait Implementations§
impl Freeze for PassiveHealth
impl RefUnwindSafe for PassiveHealth
impl Send for PassiveHealth
impl Sync for PassiveHealth
impl Unpin for PassiveHealth
impl UnwindSafe for PassiveHealth
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more