backoff - Python library providing function decorators for configurable backoff and retry

  •        368

This module provides function decorators which can be used to wrap a function such that it will be retried until some condition is met. It is meant to be of use when accessing unreliable resources with the potential for intermittent failures i.e. network resources and external APIs. Somewhat more generally, it may also be of use for dynamically polling resources for externally generated content.Decorators support both regular functions for synchronous code and asyncio's coroutines for asynchronous code.

https://github.com/litl/backoff

Tags
Implementation
License
Platform

   




Related Projects

guava-retrying - This is a small extension to Google's Guava library to allow for the creation of configurable retrying strategies for an arbitrary function call, such as something that talks to a remote service with flaky uptime

  •    Java

##What is this? The guava-retrying module provides a general purpose method for retrying arbitrary Java code with specific stop, retry, and exception handling capabilities that are enhanced by Guava's predicate matching. This is a fork of the excellent RetryerBuilder code posted here by Jean-Baptiste Nizet (JB). I've added a Gradle build for pushing it up to my little corner of Maven Central so that others can easily pull it into their existing projects with minimal effort. It also includes exponential and Fibonacci backoff WaitStrategies that might be useful for situations where more well-behaved service polling is preferred.

node-backoff - Fibonacci and exponential backoff for Node.js

  •    Javascript

Fibonacci and exponential backoffs for Node.js. The usual way to instantiate a new Backoff object is to use one predefined factory method: backoff.fibonacci([options]), backoff.exponential([options]).

resque-retry - A resque plugin; provides retry, delay and exponential backoff support for resque jobs

  •    Ruby

A Resque plugin. Requires Resque ~> 1.25 & resque-scheduler ~> 4.0. This gem provides retry, delay and exponential backoff support for resque jobs.

spring-retry

  •    Java

Spring Retry provides an abstraction around retrying failed operations, with an emphasis on declarative control of the process and policy-based bahaviour that is easy to extend and customize. For instance, you can configure a plain POJO operation to retry if it fails, based on the type of exception, and with a fixed or exponential backoff.

retriable - Retriable is an simple DSL to retry failed code blocks with randomized exponential backoff

  •    Ruby

Retriable is a simple DSL to retry failed code blocks with randomized exponential backoff time intervals. This is especially useful when interacting external APIs, remote services, or file system calls. If you need ruby 1.9.3 support, use the 2.x branch by specifying ~2.1 in your Gemfile.


backoff - The exponential backoff algorithm in Go (Golang).

  •    Go

This is a Go port of the exponential backoff algorithm from Google's HTTP Client Library for Java. Exponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate. The retries exponentially increase and stop increasing when a certain threshold is met.

retry - A simple, stateless, functional mechanism to perform actions repetitively until successful.

  •    Go

A simple, stateless, functional mechanism to perform actions repetitively until successful. This project is currently in "pre-release". While the code is heavily tested, the API may change. Vendor (commit or lock) this dependency if you plan on using it.

cockatiel - A resilience and transient-fault-handling library that allows developers to express policies such as Backoff, Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback

  •    TypeScript

I recommend reading the Polly wiki for more information for details and mechanics around the patterns we provide. There are two events, onSuccess/onFailure, that are called when a call succeeds or fails. Note that onFailure only is called if a handled error is thrown.

backoff - Simple backoff algorithm in Go (golang)

  •    Go

Backoff is a time.Duration counter. It starts at Min. After every call to Duration() it is multiplied by Factor. It is capped at Max. It returns to Min on every call to Reset(). Jitter adds randomness (see below). Used in conjunction with the time package. Enabling Jitter adds some randomization to the backoff durations. See Amazon's writeup of performance gains using jitter. Seeding is not necessary but doing so gives repeatable results.

opnieuw - One weird trick to make your code more reliable

  •    Python

Opnieuw is a general-purpose retrying library, written in Python, in order to simplify the task of adding retry behavior to both synchronous as well as asynchronous tasks. Opnieuw is easy and straightforward to use. See our announcement post for a bit more background on why we wrote Opnieuw.

tenacity - Retrying library for Python

  •    Python

Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything. It originates from a fork of retrying. The simplest use case is retrying a flaky function whenever an Exception occurs until a value is returned.

laravel-webhook-server - Send webhooks from Laravel apps

  •    PHP

A webhook is a way for an app to provide information to another app about a particular event. The way the two apps communicate is with a simple HTTP request. This package allows you to configure and send webhooks in a Laravel app easily. It has support for signing calls, retrying calls and backoff strategies.

rocky - Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js

  •    Javascript

A multipurpose, full-featured, middleware-oriented and hackable HTTP/S and WebSocket proxy with powerful built-in features such as versatile routing layer, traffic interceptor and replay to multiple backends, built-in balancer, traffic retry/backoff logic, hierarchical configuration, among others. Built for node.js/io.js.rocky can be fluently used programmatically or via command-line interface. It's framework agnostic, but you can optionally plug in with connect/express apps.

toxy - Hackable HTTP proxy for resiliency testing and simulated network conditions

  •    Javascript

Hackable HTTP proxy to simulate server failure scenarios, resiliency and unexpected network conditions, built for node.js.It was mainly designed for failure resistance testing, when toxy becomes particularly useful in order to cover fault tolerance and resiliency capabilities of a system, especially in disruption-tolerant networks and service-oriented architectures, where toxy may act as MitM proxy among services in order to inject failure.

node-graceful-fs - fs with incremental backoff on EMFILE

  •    Javascript

graceful-fs functions as a drop-in replacement for the fs module, making various improvements.The improvements are meant to normalize behavior across different platforms and environments, and to make filesystem access more resilient to errors.

Heimdall - An enhanced HTTP client for Go

  •    Go

Heimdall is an HTTP client that helps your application make a large number of requests, at scale. With Heimdall, you can use a hystrix-like circuit breaker to control failing requests, Add synchronous in-memory retries to each request, with the option of setting your own retrier strategy, Create clients with different timeouts for every request.

retrying - Retrying is an Apache 2

  •    Python

Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything. The simplest use case is retrying a flaky function whenever an Exception occurs until a value is returned.

node-retry - Abstraction for exponential and custom retry strategies for failed operations.

  •    Javascript

Abstraction for exponential and custom retry strategies for failed operations. This module has been tested and is ready to be used.

async-retry - Retrying made simple, easy and async

  •    Javascript

Retrying made simple, easy and async

retry - A tiny library for retrying failing operations.

  •    PHP

A tiny library for retrying failing operations. Since the network is reliable, things should always work. Am I right? For those cases when they don't, there is retry.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.