Type Alias PolynomialBackoffSettings

PolynomialBackoffSettings: {
    degree?: number;
    jitter?: number | null;
    maxDelay?: ITimeSpan;
    minDelay?: ITimeSpan;
}

Configuration for the polynomial backoff policy. The wait time grows as minDelay * attempt^degree, clamped to maxDelay. An optional jitter factor randomises the delay to reduce retry collisions.

IMPORT_PATH: "@daiso-tech/core/backoff-policies"

Type declaration

  • Optionaldegree?: number

    The exponent of the polynomial used to calculate the delay: minDelay * attempt^degree. Higher values produce faster growth in wait times.

    2
    
  • Optionaljitter?: number | null

    Adds randomness to the delay to avoid thundering-herd effects. Set to null to disable jitter.

    0.5
    
  • OptionalmaxDelay?: ITimeSpan

    Upper bound on the computed delay. The wait time will never exceed this value.

    import { TimeSpan } from "@daiso-tech/core/time-span";

    TimeSpan.fromSeconds(60)
  • OptionalminDelay?: ITimeSpan

    Starting delay for the first retry. Subsequent delays grow from this base.

    import { TimeSpan } from "@daiso-tech/core/time-span";

    TimeSpan.fromMilliseconds(500)