Skip to content
← All posts
Guides·5 min read

Retry strategies that don't take down your own API

DO

Daniel Okafor

Engineering, HookFlow

When your endpoint fails, retrying immediately is the worst thing a sender can do. If the failure was caused by load, a burst of retries makes it worse; if it was caused by a bad deploy, retries just fail faster. HookFlow schedules retries with exponential backoff starting at 10 seconds and doubling up to a one-hour ceiling, for a total window of 72 hours on Pro.

Backoff alone isn't enough. If a thousand events fail at the same moment, they will all retry at the same moment too. We add full jitter — each retry is scheduled at a random point within the backoff interval — which spreads the load into a gentle slope instead of a wall.

For endpoints that are clearly down, we also apply a circuit breaker. After 20 consecutive failures, HookFlow pauses delivery to that endpoint and probes it with a single request every minute. When a probe succeeds, queued events drain at a controlled rate so a freshly recovered service isn't immediately flattened.

You can tune all of this per endpoint: the retry window, the maximum attempts, and the drain rate after recovery. Events that exhaust their retries land in the dead-letter queue, where you can inspect them and replay them individually or in bulk once the underlying problem is fixed.