Naming Prosecution Mitigator
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

mesh-balance

0.0.1 • Public • Published

load balancing algorithms for mesh

npm install mesh-balance

balance.rotate(workers)

Runs workers. Round-robin style.

var workers = Array.apply(void 0, new Array(10)).map(function() {
  return mesh.wrap(function(operation, next) {
    next();
  });
});
 
var bus = mesh.rotate(workers);

balance.least(workers)

Runs the worker with the least number of running operations

balance.random(workers)

runs a random worker

Keywords

install

npm i mesh-balance

Downloadsweekly downloads

4

version

0.0.1

license

ISC

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar