Book: TypeScript in Production
Also by me: The TypeScript Library — the 5-book collection
My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
Me: xgabriel.com | GitHub
You are on call. The payments provider returns a brief 503, the kind of routine ten-second hiccup that fills any large provider's status page. Every node in your service hits it on the same wall-clock second. Every node has the same retry policy: wait one second, retry, then two, then four. A second later every node retries. Two seconds after that every node retries again. The provider, which was nearly recovered, is now hammered by a synchronised wave of clients who all chose the same backoff. Their on-call sees a second spike worse than the first.
This is the thundering-herd failure mode, and a naive setTimeout(retry, base * 2 ** n) loop is what causes it. The fix is jitter.…