1

Does anyone know of a Node.js module like multi-node or stereo that will run multiple server processes natively on Windows.

Those above listed modules all have calls to "process.binding("net")" and that line seems to currently only work on posix machines (see this bug: https://github.com/joyent/node/issues/1373), but blows up on Windows.

Other suggestions are welcome, too!

  • Node 0.5.10 has multi-node like behaviour build in, it should work on windows for some value of work. – Raynos Oct 24 '11 at 10:33

1 Answers1

0

Have you tried the built in cluster module? ...

Node.JS v0.6.X includes the "cluster" module straight out of the box, which makes it easy to set up multiple node workers that can listen on a single port. This is NOT the same as the learnboost "cluster" module.

http://nodejs.org/docs/latest/api/cluster.html

if (cluster.isMaster) {
  // Fork workers.
  for (var i = 0; i < numCPUs; i++) {
    cluster.fork();
  }
} else {
  http.Server(function(req, res) { ... }).listen(8000);
}

see this post

Community
  • 1
  • 1
Dave Dopson
  • 41,600
  • 19
  • 95
  • 85