Backoff Algorithms
Rebound uses a simple exponential backoff system:
finalDelay = initialDelay * (backoffFactor ^ currentAttempt)
Example:
@Rebound({
delay: 1000,
backoffFactor: 2,
})
| Attempt | Delay |
|---|---|
| 1 | 1000 ms |
| 2 | 2000 ms |
| 3 | 4000 ms |
Exponential backoff is ideal for:
- Rate-limited APIs
- Backend overload protection
- Avoiding retry floods