socket sharing
Several processes accepting connections on the same listening port, with the operating system or a parent process passing connections between them.
In more detail
It is what lets every cluster worker call listen(3000) without an address-in-use error. On Linux the reuse-port socket option offers another way for several processes to share a port.
Related terms
- 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.
- network socket — One end of a two-way network connection between programs, identified by an IP address and a port number.
Taught in
- Cluster Architecture: node:cluster & Zero-Downtime — Node.js Internals & Backend Services