lloyd / node-toobusy

Build Node.JS servers that don't fall over.
1.3k stars 128 forks source link

No singleton #29

Open nherment opened 10 years ago

nherment commented 10 years ago

It would be great if it was possible to create multiple toobusy instance, each with a different maxLag:

  var Toobusy = require('toobusy')

  var toobusy1 = new Toobusy()
  toobusy1.maxLag(20)

  var toobusy2 = new Toobusy()
  toobusy2.maxLag(100)

I'd like to use toobusy to manage multiple actions with different priorities.

Right now the workaround is to look at the lag value but that defeats the niceness of toobusy which returns a simple boolean.

tlhunter commented 9 years ago

:+1: I like the idea of one toobusy instance handling HTTP traffic, and another, more aggressive instance handling worker queue task consumption.

asilvas commented 9 years ago

This repo was abandoned quite some time ago. If this is the behavior you want, here is a wrapper for toobusy (a js fork) that has a number of spiffy features.

https://github.com/godaddy/node-connect-qos

tlhunter commented 9 years ago

Could you updated the README saying this repo is deprecated and link to the suggested module?