Std.Http.Retry.Backoff
1 declaration
type
BackoffThis declaration introduces a public type.
What it does
How many times to try, and how long to wait between attempts.
A service that calls another over a network will meet a failure that would
have succeeded a moment later: a connection reset while an instance
restarts, a gateway between deployments, a rate limit that clears. Trying
again is the whole answer, and doing it without these three rules is worse
than not doing it at all.
Wait longer each time. Retrying immediately turns one failure into
several, and every caller retrying at once at the moment a service comes
back is what stops it coming back.
Wait a random amount. Every caller backing off by the same doubling
arrives together anyway, one step later. The spread is what breaks that up,
and it is why jitter is not a refinement to add afterwards.
Give up. A budget bounds the total wait, so a request cannot sit for
minutes behind a service that is simply down while whoever asked for it
waits.
Read the signature
- This declaration has no value signature because it introduces a type or trait.
