/js-exponential-backoff-algorithm

NodeJS implementation of an Exponential backoff algorithm to retry requests or actions

Primary LanguageTypeScript

js-exponential-backoff-algorithm

Overview

This project serves as an educational example only, it fires a number of actions and then retries the ones that fail, observing the maximum number of retries provided or the total success as conditions to stop

More info here

How to use

Install dependencies:

npm install

Running:

npm run dev -- --count=300 --max_retries=10 --success_ratio=0.1

Debugging with vscode is easy, just start the debug command and attach from vscode:

npm run dev:debug