Skip to content

Discussion: should the master spawn a new worker if an exception kills one? #21

Description

@brianloveswords

Is it/should it be one of the design goals of up to add a new worker to the pool if one dies unexpectedly?

A contrived example, but a server like the following can only survive N requests, where N is the initial number of spawned workers.

// server.js
function hdlr (request, response) {
  response.end(''+Math.random());
  process.nextTick(function () { crash(); })
}
module.exports = require('http').createServer(hdlr);

I think it'd be great if up could ensure that it never gets to a point where there are zero active workers. I've been experimenting with using up in a semi-production environment and I've been burnt by this before, but I wanted to make sure this wasn't a WONTFIX type of issue before putting any time into patching it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions