Recall & Review
beginner
What is the role of the master process in Node.js cluster?
The master process manages worker processes. It creates, monitors, and distributes tasks to workers to balance the load.
Click to reveal answer
beginner
What is a worker process in Node.js cluster?
A worker process is a child process created by the master. It runs the application code and handles incoming requests.
Click to reveal answer
intermediate
How do master and worker processes communicate in Node.js?
They communicate using an internal messaging system with events and messages passed between the master and workers.
Click to reveal answer
beginner
Why use master and worker processes in Node.js?
To use multiple CPU cores efficiently by running multiple instances of the app, improving performance and reliability.
Click to reveal answer
intermediate
What happens if a worker process crashes in a Node.js cluster?
The master detects the crash and can automatically create a new worker to replace it, keeping the app running smoothly.
Click to reveal answer
What does the master process do in a Node.js cluster?
✗ Incorrect
The master process creates and manages worker processes to distribute workload.
How many worker processes can a Node.js cluster have by default?
✗ Incorrect
By default, the cluster module creates one worker per CPU core to maximize resource use.
What happens when a worker process crashes in a cluster?
✗ Incorrect
The master process listens for worker exit events and can restart workers automatically.
Which module in Node.js helps create master and worker processes?
✗ Incorrect
The cluster module is designed to create and manage master and worker processes.
How do master and worker processes share workload?
✗ Incorrect
The master process distributes incoming connections to worker processes to balance load.
Explain how master and worker processes work together in Node.js cluster.
Think about who manages and who does the work.
You got /5 concepts.
Describe what happens when a worker process crashes and how the cluster handles it.
Focus on fault tolerance and recovery.
You got /4 concepts.