The Cluster
The cluster module allows node.js to spawn multiple processes that can share the same server port and handle incoming requests each process runs.
Key characteristics of Cluster
- Manager Role
- Worker Processes
- Load Balancing
- Fault Tolerance
Advantage of Worker
- freeing up the main thread
- processing of CPU-intensive requests
- native JS multithreading
Summary
Use the cluster module when you want your node.js application to be highly available and scalable because it's gonna scale
Use worker threads if you want to be able to process CPU intensive tasks in one go.
SOCIAL SHARE CARD GENERATOR