Concept Flow - How cluster module works
Start Master Process
Fork Worker Processes
Workers Listen on Server Port
Master Distributes Incoming Requests
Workers Handle Requests Independently
If Worker Dies
→Master Forks New Worker
Continue Serving
The master process starts and forks multiple worker processes. Each worker listens on the same server port. The master distributes incoming requests to workers. If a worker dies, the master replaces it.