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
HTTP 是 Node.js 中的一等公民。它设计的是流式和低延迟。这使得 Node.js 非常适合于 web 库或框架的基础。
39
-
40
-
仅仅因为 Node.js 是在没有线程的情况下设计的,这并不意味着您无法利用环境中的多个内核。子进程可以通过使用我们的 [`child_process.fork()`][] API 来生成,并且被设计为易于沟通。建立在同一接口上的是 [`cluster`][] 模块,它允许您在进程之间共享套接字,以便在核心上启用负载平衡。
37
+
Node.js 被设计成单线程运行,但这并不意味着你无法利用到 CPU 的多个核心。你可以通过 [`child_process.fork()`][] API 来生成子进程,并且它被设计成非常易于通信。而建立在同一个接口之上的 [`cluster`][] 模块允许你在进程之间共享套接字(sockets),以实现核心的负载均衡。
0 commit comments