When a worker crashes, the master process receives an 'exit' event. You can listen to this event and call cluster.fork() to automatically respawn a new worker, ensuring high availability of the application.
Worker crashes are a natural occurrence in production environments. The Cluster module provides the 'exit' event on the cluster object that fires whenever a worker dies. You must explicitly handle this event and fork a new worker — Node.js does NOT automatically restart crashed workers without your intervention.
worker — the Worker object that exited
code — the exit code (0 = clean exit, non-zero = error)
signal — the signal that killed the process (e.g., SIGKILL)
worker.exitedAfterDisconnect — true if intentionally disconnected, false if crashed