What is Node.js cluster?
The Node.js cluster module allows multiple Node.js processes to run and share server ports through a primary-worker process architecture. This can utilize multiple CPU cores because each worker is a separate process. In modern production systems, external process managers and container orchestration are also commonly used for process replication and scaling.
Key Takeaways
- Cluster uses multiple processes.
- Separate processes can utilize multiple CPU cores.
- Production deployments may also use containers and external orchestration.
Knowledge Check
What is a key benefit of Node.js cluster?