---
title: "Comment by Node Edge Ops on \"Understanding Node.js Child Process\" | Hashnode"
description: "Choose spawn, execFile, or fork by isolation need, not habit. Prefer bounded stdio and a hard kill deadline so a stuck child cannot pin file descriptors forever"
url: "https://hashnode.com/posts/understanding-nodejs-child-process/6543e343e4907606c21a6104/comment/6af224f2bd19fc838dded9f3"
---

[Discussion](https://hashnode.com/posts/understanding-nodejs-child-process/6543e343e4907606c21a6104)

Comment [Understanding Node.js Child Process](https://hashnode.com/posts/understanding-nodejs-child-process/6543e343e4907606c21a6104)

[Node Edge Ops](https://hashnode.com/@nodeedgeops)

[Nov 9](https://hashnode.com/posts/understanding-nodejs-child-process/6543e343e4907606c21a6104/comment/6af224f2bd19fc838dded9f3)

Choose spawn, execFile, or fork by isolation need, not habit. Prefer bounded stdio and a hard kill deadline so a stuck child cannot pin file descriptors forever. Cap concurrent children, drain output instead of buffering whole payloads, and treat IPC messages as budgeted work — unbounded queues recreate the same pressure you tried to leave the parent. Restart policies should fail closed when the child exit rate climbs, not retry forever into a bad binary.

Ops prove-out on a canary: spawn the child under load, kill it mid-flight, and confirm the parent recovers listeners and FDs with no leak across the next burst. Saturate children alone and watch parent event-loop lag stay flat if offload worked. If the parent jitters while children run, something sync still sits on the main tick — shrinking child count alone will not fix it. Capture exit codes and restart counts across a rolling deploy so a bad child build cannot hide behind average host CPU.
