sahat/hackathon-starter — pull request #14 by danielamitay (2014-01-28 08:19:18+00:00)
Title: Create cluster_app.js to enable simple process forking

Hey Sahat, awesome starter project!

I believe that the majority of projects born out of this boilerplate can benefit greatly from the [**cluster**](http://nodejs.org/api/cluster.html) module introduced in v0.8 of Node.js. Per the documentation:

> A single instance of Node runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node processes to handle the load. The cluster module allows you to easily create child processes that all share server ports.

Essentially, if you currently deploy the boilerplate to Heroku, it will only utilize one of the four CPUs at its disposal.

I added a section to the readme explaining the same in addition to a warning that it should only be used after having understood the purpose and behavior. To create an instance of `app.js` for each available CPU, simply call `node cluster_app.js` instead of `node app.js`