Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Node.js' Cluster module and Learnboost's Cluster module?

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?

like image 554
Andrew De Andrade Avatar asked Jul 23 '12 21:07

Andrew De Andrade


People also ask

What is Node JS cluster module?

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.

What are the different modules in NodeJS?

Node.js has two module systems: CommonJS modules and ECMAScript modules.

What is the difference between cluster and Worker_threads packages in node JS?

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.


2 Answers

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.

like image 102
Marc Avatar answered Oct 18 '22 10:10

Marc


The cluster module has now been added back in to the core set of modules.

like image 39
James Avatar answered Oct 18 '22 11:10

James