Notes on Retries

1 todsacerdoti 1 6/18/2025, 2:17:31 PM justinblank.com ↗

Comments (1)

a-dub · 4h ago
traditionally helps with thundering herd, but counterintuitively can help with just a single client. if the action potentially has an unknown duration long tail in terms of state or load on the service, backoff can help find that duration and allow for things to return to a quiescent state before trying again.

for example, if your action allocates near capacity ram and then releases it after some long unspecified time, a fixed period retry with a too-short period can result in a 2x allocation plus any knock on effects from thrash up to and including a compounding non-linear increase in resource demand. where exponential back-off is more likely to eventually succeed as it increases the period witb each attempt.