Node Cluster Module Examples
This repo contains several examples on how Node.js cluster module can be used to increase performance of Node applications. The complete article is here.
To clone this repo in your machine:
git clone https://github.com/behroozk/node-cluster-tutorial.git
Then, to download all the requirements:
npm install
Here is a list of all the examples in this repo:
simple.js
: contains a simple use of cluster moduleexpress.js
: a more advanced example with built with Express serverperformance.js
: a dummy example for benchmarking performance of the application using cluster modulecommunication.js
: demonstrate how master and workers can communicatezer_downtime.js
: an example for automatically restarting workers without stopping the application