node-worker-nodes icon indicating copy to clipboard operation
node-worker-nodes copied to clipboard

minWorkers/maxWorkers ambiguity

Open kwiatkk1 opened this issue 8 years ago • 0 comments

The minWorkers option is only respected when initially reporting pool readiness, but should also be treated as a number of workers that the pool needs to keep running all the time, i.e.:

  • on any accidental worker termination, pool should boot a new worker immediately (if minWorkers number is greater than the current number of healthy workers)
  • a planned worker exit (for example as a result of WorkerEndurance value exceedance) should result in a spawn of a new worker before starting the process of termination the exhausted one (maybe even at cost of some extra calls above declared endurance).

kwiatkk1 avatar Jan 24 '17 21:01 kwiatkk1