# cenkalti/backoff

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cenkalti-backoff).**

4,021 stars · 215 forks · Go · MIT

## Links

- GitHub: https://github.com/cenkalti/backoff
- awesome-repositories: https://awesome-repositories.com/repository/cenkalti-backoff.md

## Topics

`golang`

## Description

This is a Go library providing a framework for managing repetitive task execution and implementing exponential backoff strategies. It serves as a concurrency tool designed to prevent system overload during failures by retrying operations with increasing delays.

The project implements a retry strategy framework that manages attempt limits and timeouts during unstable network or system calls. It specifically provides an implementation of the exponential backoff algorithm to handle failing operations.

The library covers reliability patterns for mitigating transient failures and service outages, including the management of API request retries and inter-service communication in microservices. It handles transient error recovery and distributed system resilience through automated re-execution of failing tasks.

## Tags

### Programming Languages & Runtimes

- [Go Concurrency Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/go-concurrency-utilities.md) — Provides advanced concurrency primitives for managing repetitive task execution and synchronization in Go.
- [Go Implementations](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/background-task-management/background-task-retry-policies/asynchronous-task-retries/exponential-backoff-retries/go-implementations.md) — Provides a Go-specific implementation of the exponential backoff algorithm for failed operations.

### Software Engineering & Architecture

- [Transient Fault Recovery](https://awesome-repositories.com/f/software-engineering-architecture/error-handling-strategies/transient-fault-recovery.md) — Provides automated strategies to recover from transient faults through re-execution and backoff.
- [Resilient Networking Patterns](https://awesome-repositories.com/f/software-engineering-architecture/resilient-networking-patterns.md) — Implements stability patterns using retries to handle temporary network failures or service outages.
- [Backoff Strategies](https://awesome-repositories.com/f/software-engineering-architecture/retry-policies/backoff-strategies.md) — Provides an exponential backoff algorithm to calculate increasing delays between retry attempts.
- [Retry Strategies](https://awesome-repositories.com/f/software-engineering-architecture/retry-strategies.md) — Offers a framework for managing retry logic, attempt limits, and timeouts during system calls.
- [Automated Async Retries](https://awesome-repositories.com/f/software-engineering-architecture/task-retry-policies/automated-async-retries.md) — Automatically re-executes failing functions based on a defined number of attempts and backoff strategy. ([source](https://cdn.jsdelivr.net/gh/cenkalti/backoff@v6/README.md))
- [Function Execution Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/function-execution-wrappers.md) — Encapsulates target operations within closures to manage their repeated execution and error tracking.
- [Inter-Service Communication Reliability](https://awesome-repositories.com/f/software-engineering-architecture/go-microservices-architectures/inter-service-communication-reliability.md) — Improves the reliability of inter-service communication in Go by adding smart retry logic to network requests.
- [Retry State Tracking](https://awesome-repositories.com/f/software-engineering-architecture/retry-state-tracking.md) — Tracks the number of failed attempts to enforce maximum retry limits.

### DevOps & Infrastructure

- [Request Retries](https://awesome-repositories.com/f/devops-infrastructure/api-service-management/api-resilience/request-retries.md) — Implements strategies for automatically re-attempting failed network requests to external services.
- [Retry Strategy Interfaces](https://awesome-repositories.com/f/devops-infrastructure/dependency-management/dependency-injection-containers/package-dependency-decoupling/interface-based-decoupling/retry-strategy-interfaces.md) — Decouples the retry logic from specific wait algorithms using interfaces to allow custom delay implementations.

### Part of an Awesome List

- [Algorithms](https://awesome-repositories.com/f/awesome-lists/devtools/algorithms.md) — Exponential backoff algorithm.
