Skip to main content

minSafeTtl

@rotorsoft/act-root


@rotorsoft/act-root / act-ops/src/idempotency / minSafeTtl

Function: minSafeTtl()

minSafeTtl(profile): number

Defined in: libs/act-ops/src/idempotency/min-safe-ttl.ts:60

Minimum safe TTL in milliseconds for a receiver-side IdempotencyStore window, given the sender's retry profile.

The envelope is:

ttl = (backoff_sum + (maxRetries + 1) * timeoutMs) * safetyFactor

where backoff_sum is the sum of per-retry delays from the chosen strategy, multiplied by 1.5 if jitter is enabled (the worst-case multiplier in [0.5, 1.5)). safetyFactor defaults to 4 because operators almost always want headroom over the bare envelope โ€” slow networks, clock skew, and incident-window retries stretch the real-world maximum past the computed one.

Parametersโ€‹

profileโ€‹

RetryProfile

Returnsโ€‹

number