You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,8 @@ node app.js
82
82
> application and automatically restart the server. Once installed, instead of `node app.js` use `nodemon app.js`.
83
83
> It is a big time saver in the long run.
84
84
85
+
> **Cluster**: You can execute an instance of `app.js` for each CPU by calling `node cluster_app.js` instead of `node app.js`
86
+
85
87
Next up, if you want to use any of the APIs or OAuth authentication methods, you will need to obtain
86
88
appropriate credentials: Client ID, Client Secret, API Key, or Username & Password. You will
87
89
need to go through each provider to generate new credentials.
@@ -212,6 +214,14 @@ For the sake of simplicity. While there might be a better approach, such as pass
212
214
### I don't need a sticky footer, can I delete it?
213
215
Absolutely. But unlike a regular footer there is a bit more work involved. First, delete `#wrap` and `#footer`*ID*s from **styles.less**. Next delete `#wrap` and `#footer` from **layout.jade**. If no element is specified before the class or id, Jade assumes it's a `div` element. Don't forget to indent everything under `#wrap` to the left once, since this project uses two spaces per block indentation.
214
216
217
+
### What is cluster_app.js?
218
+
Per the [documentation](http://nodejs.org/api/cluster.html):
219
+
> A single instance of Node runs in a single thread. To take advantage of multi-core systems
220
+
> the user will sometimes want to launch a cluster of Node processes to handle the load.
221
+
> The cluster module allows you to easily create child processes that all share server ports.
222
+
223
+
`cluster_app.js` allows you to take advantage of this feature by forking a process of `app.js` for each CPU detected. For the majority of applications serving HTTP requests, this is a resounding boon. However, the cluster module is still considered **"Stability: 1 - Experimental"**, therefore it should only be used after understanding it's purpose and behavior.
224
+
215
225
TODO
216
226
----
217
227
- Concatenate and minify all assets via Express middleware if possible, otherwise Gulp.js. Because even with caching enabled, there is at least 50-80ms delay for each static file request (On Heroku).
0 commit comments