2 const cluster = require('cluster');
3 const os = require('os');
4 const path = require('path');
6 if (cluster.isMaster) {
7 console.log('master running on pid %d', process.pid);
8 for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork();
10 require(path.join(__dirname, 'http_simple.js'));