Bird
0
0

What is the primary reason to restart a worker process in a Node.js cluster after it crashes?

easy📝 Conceptual Q1 of 15
Node.js - Cluster Module
What is the primary reason to restart a worker process in a Node.js cluster after it crashes?
ATo log the crash details without restarting
BTo maintain application availability and handle requests without downtime
CTo clear the worker's memory cache manually
DTo reduce CPU usage by stopping the worker permanently
Step-by-Step Solution
Solution:
  1. Step 1: Understand worker crash impact

    When a worker crashes, it stops handling requests, causing downtime if not restarted.
  2. Step 2: Purpose of restarting workers

    Restarting workers ensures the application continues to serve users without interruption.
  3. Final Answer:

    To maintain application availability and handle requests without downtime -> Option B
  4. Quick Check:

    Reason to restart worker = Maintain availability [OK]
Quick Trick: Restart crashed workers to keep app running smoothly [OK]
Common Mistakes:
  • Thinking restart reduces CPU permanently
  • Confusing restart with clearing cache
  • Assuming logging alone fixes crashes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes