Skip to main content

recovery_delay

Function recovery_delay 

Source
pub fn recovery_delay(
    consecutive_failures: u32,
    any_active: bool,
    fraction: f64,
) -> Duration
Expand description

How long to wait before trying to re-establish a failed flow (§4.5).

W = min(max-time, base-time * 2^consecutive-failures), then “a uniform random time between 50 and 100% of the upper-bound wait time”.

any_active picks the base: §4.5 gives 30 seconds when every flow has failed and 90 when at least one is still up. The asymmetry is the interesting part — a UA that has no working flow is unreachable and should hurry; one that still has a flow is reachable already, and hurrying only adds load to a registrar that is plainly having a bad day.