Node.js itself has a core module called Cluster ( ref: http://nodejs.org/docs/v0.8.3/api/cluster.html) and Learnboost has released a module that is also named Cluster (ref: http://learnboost.github.com/cluster/ https://github.com/LearnBoost/cluster).
How do these two compare? Are they related in someway?
Node. js runs single threaded programming, which is very memory efficient, but to take advantage of computers multi-core systems, the Cluster module allows you to easily create child processes that each runs on their own single thread, to handle the load.
Node.js has two module systems: CommonJS modules and ECMAScript modules.
Clusters of Node. js processes can be used to run multiple instances of Node. js that can distribute workloads among their application threads. When process isolation is not needed, use the worker_threads module instead, which allows running multiple application threads within a single Node.
Nick Hagianis alredy said it, the cluster module of node.js was temporarily removed. As far as I can see the LearnBoost cluster module isn't developed actively any more. The issues list of the LearnBoost module is quite long.
The LearnBoost module has some features as zero-downtime restart that the internal module doesn't offer. But I'm not sure if it still works with current (0.8.x) versions of node. If you need similar features you may take a look at the Forever tool.
The cluster module has now been added back in to the core set of modules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With