logoalt Hacker News

wat10000yesterday at 10:46 PM1 replyview on HN

The whole point of exponential backoff is that the first retry can be quick.


Replies

jdm2212yesterday at 10:55 PM

The right answer is for the RPC framework to accurately communicate "try again on another node" vs "don't try again, just hard fail".

When one end user request fans out to hundreds of backend requests (typical for microservices), you can't have each of those backend requests do its own exponential backoff. If they do it in parallel, they're a thundering herd, and if they do it in serial, the end user request will time out before you finish all the work, at which point you're doing a bunch of slow expensive work for no gain (and the enqueued slow expensive work will make your outage worse).

show 1 reply