in Uncategorized

Cluster Example with Node 0.6.x

Here is a quick example to show how to manage an app in a cluster. Node’s (v0.6.x) cluster API is simple, but it takes a few extra steps to make the cluster management scriptable. The example below shows how.


You can then do

node cluster-sample.js

to start app in a cluster, and then

node  stop

to cleanly stop the cluster or

node cluster-sample.js shutdown

to gracefully shutdown.

Write a Comment

Comment