ebackoff

0.1.0 • Public • Published

Exponential backoff algorithm

This is a very simple implementation of the expoenential backoff algorithm. It returns the amount of time after which the node should retry to transmit. You will have to set the delay yourself.

Installation

npm install ebackoff

Function

  • getBackoff(collisions)

Example usage

	const BackOff = require('./backoff')
	const backoff = new BackOff()

	console.log(backoff.getBackoff(1))
	console.log(backoff.getBackoff(5))
	console.log(backoff.getBackoff(10))

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i ebackoff

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bat_coder