Blogs / Personal blogs

Josh Bleecher Snyder

commaok.xyz

Words about Go and software

Popular posts
1
Total points
132
HN comments
45
Rank
#17,530 personal

Visit commaok.xyz → RSS feedOn Hacker News May 2025 – May 2025

Systems & Performance 1Software Engineering 1

1

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 :=…