For example, using cluster-master,
touch a file, i.e webapp-master.js
:
var clusterMaster = require('cluster-master');
clusterMaster({
exec: '/usr/bin/bell', // bell bin path
size: 5, // workers count
args: ['webapp', '-c', './configs.toml', '-l', '5']
})
and then run it:
$ node --harmony-generators webapp-master.js
You need to set your linux's max open files
to at least 10k,
see how to.