Use multiple Node.js processes to take advantage of more CPU cores and handle more traffic.
A single Node.js process primarily runs JavaScript on one main thread. The cluster approach allows an application to start multiple Node.js processes, often called workers, so incoming traffic can be distributed across multiple processes.
Clusters can help applications use multiple CPU cores and improve their ability to handle traffic. However, workers are separate processes with their own memory, so shared state, sessions, WebSocket connections, and communication between workers need careful design.
What you'll walk away knowing