NodeJS runs in a single thread by default. Cluster module creates several child processes that operate parallelly sharing the same server port. Advantages: The use of all the available cores for application execution improves scalability. Disadvantages: Session management isn’t possible; instead, a developer must handle the alternatives, which adds to the complexity.
Table of contents
NodeJS Performance Optimization with ClusteringWhat is NodeJS Clustering?How Does Cluster Module Work?How to Use Clustering in Your Node Application?Sort: