🚨 Oh joy, yet another article trying to make "exponential backoff with jitter" sound like the most thrilling #coding concept since the invention of the #semicolon. 🤓 Spoiler alert: it's about as exciting as watching paint dry, but now with a touch of #jitter for those who like their boredom with a side of #randomness. 🎨
https://commaok.xyz/post/simple-backoff/ #exponentialbackoff #humor #techboredom #HackerNews #ngated
Simpler backoff

Exponential backoff with jitter is de rigeur for making service calls. This code, or something like it, probably looks really familiar: func do(ctx context.Context) error { const ( maxAttempts = 10 baseDelay = 1 * time.Second maxDelay = 60 * time.Second ) delay := baseDelay for attempt := range maxAttempts { err := request(ctx) if err == nil { return nil } delay *= 2 delay = min(delay, maxDelay) jitter := multiplyDuration(delay, rand.

With our 12yo we must apply #exponentialbackoff on every unsatisfied request. With the 8yo and 10yo basic repeat is fine.. :)))

This is *so important* for recovering from temporary hiccups at #scale:

“Exponential Backoff And Jitter” [2015], AWS Architecture Blog (https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/).

Via HN: https://news.ycombinator.com/item?id=27500128

#Reliability #Scalability #Recovery #Backoff #ExponentialBackoff #Retries #Jitter

Exponential Backoff And Jitter | Amazon Web Services

Update (May 2023): After 8 years, this solution continues to serve as a pillar for how Amazon builds remote client libraries for resilient systems. Most AWS SDKs now support exponential backoff and jitter as part of their retry behavior when using standard or adaptive modes. Consequently, this pattern can be leveraged without having to incorporate […]

Amazon Web Services