| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 950648d commit 931be52
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,9 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | 7 | <!-- source_link=lib/cluster.js --> | |
| 8 | 8 | ||
| 9 | - A single instance of Node.js runs in a single thread. To take advantage of | ||
| 10 | - multi-core systems, the user will sometimes want to launch a cluster of Node.js | ||
| 11 | - processes to handle the load. | ||
| 9 | + Clusters of Node.js processes can be used to run multiple instances of Node.js | ||
| 10 | + that can distribute workloads among their application threads. When process | ||
| 11 | + isolation is not needed, use the [`worker_threads`][] module instead, which | ||
| 12 | + allows running multiple application threads within a single Node.js instance. | ||
| 12 | 13 | ||
| 13 | 14 | The cluster module allows easy creation of child processes that all share | |
| 14 | 15 | server ports. | |
@@ -1121,3 +1122,4 @@ socket.on('data', (id) => { | |||
| 1121 | 1122 | [`process` event: `'message'`]: process.md#event-message | |
| 1122 | 1123 | [`server.close()`]: net.md#event-close | |
| 1123 | 1124 | [`worker.exitedAfterDisconnect`]: #workerexitedafterdisconnect | |
| 1125 | + [`worker_threads`]: worker_threads.md | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments