interface EjectionOptions
Since 0.2.0

Outlier-ejection tuning.

Properties

readonly
optional
failureThreshold: number

Failures inside the window that eject an instance.

readonly
optional
windowMs: number

Rolling window, in milliseconds, that failures are counted over.

readonly
optional
durationMs: number

How long an ejection lasts, in milliseconds.

readonly
optional
maxEjectionPercent: number

Ceiling on the percentage of a service's instances ejected at once.

A correlated failure — a bad deploy, a shared dependency — makes every instance report failures at the same time, and ejecting all of them turns a partial outage into a total one. An ejection that would push past this cap simply does not happen.

Usage

import { type EjectionOptions } from "service-discovery-plugin/src/index.ts";