Meaning
Fibonacci Backoff is a retry strategy where the delay between successive attempts follows the Fibonacci sequence. It addresses the problem of overwhelming a service with rapid retries after transient failures. It is used when an operation has failed and the client wants to pause increasingly longer intervals before retrying, without the exponential growth of exponential backoff.
Primary Function
Retry strategy
Communicative Purpose
Mitigates repeated request failures by spacing retries using a Fibonacci sequence of delays.
Pattern
operation fails → wait Fibonacci interval → retry operation
Core Structure
wait = prev_wait + prev_prev_wait
Função primária
Retry strategy
Propósito comunicativo
Mitigates repeated request failures by spacing retries using a Fibonacci sequence of delays.
Situações de gatilho
Web API client: receiving HTTP 429 Too Many Requests responses; Distributed job scheduler: transient lock acquisition failures
Contextos
HTTP client libraries, microservice communication layers, cloud SDKs, distributed job schedulers, message queue consumers
Padrão
operation fails → wait Fibonacci interval → retry operation
Estrutura central
wait = prev_wait + prev_prev_wait
Colocados típicos
- exponential backoff
- jitter
- retry decorator
- circuit breaker
- capped backoff
Substituições comuns
- Exponential backoff – grows faster
- better for high contention
- Fixed interval backoff – constant delay
- simpler but less adaptive
- Linear backoff – increases by a constant step
- slower than Fibonacci
Erros comuns
Resetting the sequence after each retry → causes no increase in delay, defeats purpose; Starting with zero delay → immediate retry leads to burst; Forgetting to cap the maximum wait → can lead to excessively long pauses
Similar / contraste
Exponential backoff – doubles delay each retry, grows faster; Fixed interval backoff – same delay each retry, no growth
Interferências
Coming from JavaScript: using setTimeout with a fixed delay inside a loop does not produce Fibonacci spacing; using async/await without updating the delay sequence leads to constant intervals
Família do chunk
- Exponential backoff
- Fixed interval backoff
- Retry decorator
- Circuit breaker
Nuance
Do not use when strict latency guarantees are required; delays can become large quickly, affecting throughput; with many retries the wait may exceed reasonable limits, so consider capping the maximum delay
Efeito pragmático
Ensures services are not hammered by rapid retries, reducing load spikes and improving overall stability.
Dica de memória
Think of a rabbit’s hop: each jump gets a bit longer, but not as fast as a cheetah’s sprint.
Nota
When combined with jitter, Fibonacci backoff reduces the chance of synchronized retries across multiple clients.
Upgrade path
Capped Fibonacci backoff with maximum wait limit
Log in to save chunks.