# cenkalti/backoff

⏱ The exponential backoff algorithm in Go

Repository: https://github.com/cenkalti/backoff
Canonical: https://ross.abutalabs.com/products/backoff
Language: Go
License: MIT
License Family: permissive
Topics: golang
Last push: 2026-06-30T15:26:08+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 35, longevity 100
- inputs: {"age_days": 4572, "days_push": 64, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4054, forks 221 (observed 2026-08-28T04:08:33.908032+00:00)

## What it is
A Go library implementing the exponential backoff algorithm with a Retry helper for retrying operations. It supports configurable retry limits, permanent errors, and context-based timeouts.

## Use cases
- retry failed http requests with exponential backoff
- add retry logic to flaky network calls in go
- rate-limit retries when calling an unstable api
- retry database or service operations until success
- stop retrying on permanent client errors

## When to choose
- you need battle-tested exponential backoff in a Go project
- you want fine-grained control over retry limits, timing, and error classification
- you need context-aware cancellation of retry loops

## When to avoid
- you need retries in a language other than Go
- you want a full circuit-breaker or resilience framework rather than just backoff
- your retry policy requires distributed coordination across services

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, error-handling, http-client
- domain: developer-tools, backend, networking
- platform: go, cross-platform
- tags: retry, exponential-backoff, resilience, rate-limiting

## Member repositories
- cenkalti/backoff (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:33.908032+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:37.907868+00:00, confidence not recorded.
  - readme: https://github.com/cenkalti/backoff (fetched 2026-08-28T04:08:33.908032+00:00, sha 90dea3e7c783)
- Data as of 2026-08-30T08:39:29.467469+00:00.
