pub struct OutlierDetection {
pub consecutive_gateway_failures: u32,
pub base_ejection_time_ms: u64,
pub max_ejection_percent: u32,
}Expand description
Per-upstream outlier-detection policy (ADR 000032). A THIRD resilience axis: active health (ADR 000017) asks “is the instance reachable?”, the circuit breaker (ADR 000028) “is the upstream saturated?”, and this “is the instance misbehaving on live traffic?”. An ejected instance leaves the rotation for a (backing-off) ejection window, independent of the health bit; a shed request (circuit breaker) never feeds it, only real upstream 5xx responses do.
Fields§
§consecutive_gateway_failures: u32Consecutive gateway-class 5xx (502/503/504) from live forwards to eject an instance; 0 =
disabled (the default). Counts only real responses — a circuit-breaker 503 or a per-try
timeout is not an instance-misbehaviour signal.
base_ejection_time_ms: u64Base ejection duration (ms): an ejected instance is out of rotation this long, doubling per consecutive ejection up to a bounded cap, then auto-returns when the window expires (no probe needed). Default 30000.
max_ejection_percent: u32Max % of the pool that may be outlier-ejected at once. The rest stay in rotation even while failing — fail-closed must not become a self-inflicted total outage (ejecting every instance). Default 10.
Trait Implementations§
Source§impl Clone for OutlierDetection
impl Clone for OutlierDetection
Source§fn clone(&self) -> OutlierDetection
fn clone(&self) -> OutlierDetection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutlierDetection
impl Debug for OutlierDetection
Source§impl Default for OutlierDetection
impl Default for OutlierDetection
Source§impl<'de> Deserialize<'de> for OutlierDetection
impl<'de> Deserialize<'de> for OutlierDetection
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 OutlierDetection
impl JsonSchema for OutlierDetection
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 moreAuto Trait Implementations§
impl Freeze for OutlierDetection
impl RefUnwindSafe for OutlierDetection
impl Send for OutlierDetection
impl Sync for OutlierDetection
impl Unpin for OutlierDetection
impl UnsafeUnpin for OutlierDetection
impl UnwindSafe for OutlierDetection
Blanket Implementations§
Source§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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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