Skip to content

theopenwebjp/full-backoff-jitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Full backoff jitter algorithm with options, variations and time testing.

Uses es6 imports/exports. For commonjs, global, please build. If is considered a common case, please create an issue or pull request.

Usage

npm install @theopenweb/full-backoff-jitter

import FullBackoffJitter from '@theopenweb/full-backoff-jitter'

const options = {
    connections: 20,
    maxConnections: 5,
    duration: 10,
    penalty: 100,
    maxAttempts: 1,
    maxSingleDuration: 30000
};

const fullBackoffJitter = FullBackoffJitter();
fullBackoffJitter.executeWithFullBackoffJitter(func, options)
.then(console.log)
.catch(console.error);

Test

npx http-server ./
# http://localhost:8080/index.html

About

Full backoff jitter algorithm with options, variations and time testing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors