---
title: "Comment by Node Edge Ops on \"Node.js Internals: Why Libuv and Worker Threads Are Fundamentally Different\" | Hashnode"
description: "Keep CPU-bound JavaScript on worker_threads and leave the libuv pool for native async I/O. A Worker still pays a boundary cost when you clone large objects on e"
url: "https://hashnode.com/posts/node-js-internals-why-libuv-and-worker-threads-are-fundamentally-different/6a7b7e77420e8c985d740b54/comment/6af2072731d9633afef5e89a"
---

[Discussion](https://hashnode.com/posts/node-js-internals-why-libuv-and-worker-threads-are-fundamentally-different/6a7b7e77420e8c985d740b54)

Comment [Node.js Internals: Why Libuv and Worker Threads Are Fundamentally Different](https://hashnode.com/posts/node-js-internals-why-libuv-and-worker-threads-are-fundamentally-different/6a7b7e77420e8c985d740b54)

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

[Nov 9](https://hashnode.com/posts/node-js-internals-why-libuv-and-worker-threads-are-fundamentally-different/6a7b7e77420e8c985d740b54/comment/6af2072731d9633afef5e89a)

Keep CPU-bound JavaScript on worker\_threads and leave the libuv pool for native async I/O. A Worker still pays a boundary cost when you clone large objects on every message; prefer a fixed SharedArrayBuffer layout with Atomics when the job shares a buffer, or pass only small job descriptors. Do not block the main tick waiting in a tight loop for worker replies — queue work and drain on message plus a small concurrency cap. Size the pool near CPU count minus one reserved for the event loop, and recycle workers after a fixed job budget so native handles cannot grow without bound.

Ops prove-out on a canary: run a known CPU hash under workers while watching event-loop lag and RSS. Lag on the parent should stay near baseline; RSS should step with worker count, not climb per job. Kill one worker mid-job and confirm the parent recovers without leaking message ports. Disable the pool and confirm latency returns to the single-thread baseline under the same load.
