cluster module

The Node.js module that starts several copies of a server as worker processes sharing one port, so a machine's CPU cores can all serve requests.

In more detail

The primary process forks workers and, on Linux and macOS, hands incoming connections to them in turn. In containers it is often simpler to run one process per container and let the orchestrator scale.

Related terms

Taught in

References