pub struct HealthProbe {
pub argv: Vec<String>,
pub interval: Duration,
pub timeout: Duration,
pub retries: u32,
pub start_period: Duration,
pub start_interval: Duration,
pub startup_grace: Duration,
}Expand description
A healthcheck resolved to argv and durations.
Fields§
§argv: Vec<String>§interval: Duration§timeout: Duration§retries: u32§start_period: Duration§start_interval: Duration§startup_grace: DurationHow long a replica that has not passed since it (re)started may fail
before its failures count: start_period when set, else
HealthProbe::default_grace.
Implementations§
Source§impl HealthProbe
impl HealthProbe
Sourcepub fn default_grace(interval: Duration, retries: u32) -> Duration
pub fn default_grace(interval: Duration, retries: u32) -> Duration
The startup grace of a healthcheck without start_period: twice the
failure budget a running replica gets (interval * retries), so a
slow first start (OIDC discovery, migrations, a JVM) is not taken
for a hang; at least 60s, as a fast probe’s budget (5s x 3) is
shorter than many starts; at most 5 minutes, so a replica that
never comes up still fails its rollout in bounded time.
Sourcepub fn failure_counts(&self, passed: bool, since_start: Duration) -> bool
pub fn failure_counts(&self, passed: bool, since_start: Duration) -> bool
Whether a failed probe counts toward retries. A replica that has
not passed since it (re)started is starting: it stays out of the
load balancer, and its failures count only once the startup grace
is over. After a pass, they count once start_period is over.