nodejs clustering, zero downtime deployment solutions
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)
Note: not yet found a 100% reason to favor multi process/cluster nodejs over nginx/haproxy stuff:
The core included module is basic, it tells you to take care of all the stuff you need in zerodowntime environments. Most of the tools below allow you to:
Code at: https://github.com/doxout/recluster/blob/master/index.js
Good: Simple and in use
Bad: No CLI , No domains, Cannot pass args
Framework in use at ebay:
Good: complete with monitoring, control URL
Bad: Seems to be massive ...
Note: naught2 was a temporary fork, but it got merged into master again
talks about Zero Downtime Crashed by intelligently handling express errors with domains
Good: simple, uses domains
Bad: seems to do it's own logging
Initial blogpost on fleet: http://blog.nodejs.org/2012/05/02/multi-server-continuous-deployment-with-fleet/
Fleet - uses drones & propagit: https://github.com/substack/fleet
Propagit: A cascading git deployment: https://github.com/substack/propagit
blogpost on fleet usage: http://opsite.wordpress.com/2013/05/04/automated-drone-management-system-for-node-js-fleet/
Flotilla: https://npmjs.org/package/flotilla
All nodejs fleet modules: https://nodejsmodules.org/new/tags/fleet
Not related, but also cool: EC2-fleet https://github.com/ashtuchkin/ec2-fleet
(+2 years no updated & probably not nodejs > 0.8 compliant) So you can safely ignore these, but they can give inspiration