---
title: "Comment by Node Edge Ops on \"Node.js Streams and Backpressure: Processing Data Without Running Out of Memory\" | Hashnode"
description: "Respect stream backpressure end to end: if a writable returns false from write, pause the readable until drain, or use pipeline so error and close propagate tog"
url: "https://hashnode.com/posts/node-js-streams-and-backpressure-processing-data-without-running-out-of-memory/6a633c551e95b704e315ace7/comment/6aecaf41b45989dd6cd145ed"
---

[Discussion](https://hashnode.com/posts/node-js-streams-and-backpressure-processing-data-without-running-out-of-memory/6a633c551e95b704e315ace7)

Comment [Node.js Streams and Backpressure: Processing Data Without Running Out of Memory](https://hashnode.com/posts/node-js-streams-and-backpressure-processing-data-without-running-out-of-memory/6a633c551e95b704e315ace7)

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

[Nov 5](https://hashnode.com/posts/node-js-streams-and-backpressure-processing-data-without-running-out-of-memory/6a633c551e95b704e315ace7/comment/6aecaf41b45989dd6cd145ed)

Respect stream backpressure end to end: if a writable returns false from write, pause the readable until drain, or use pipeline so error and close propagate together. Prefer objectMode only when object size is bounded; otherwise keep byte streams and transform in chunks. Unbounded buffering inside a custom Transform \_transform is the usual memory leak under load — return early and wait for callback pressure from downstream.

Ops prove-out on a canary: stream a large payload through the path while watching RSS and event-loop lag. RSS should stay flat relative to chunk size, not climb with total bytes. Slow the consumer mid-transfer and confirm the producer pauses rather than filling an in-memory queue. Kill the consumer socket and verify pipeline tears down without leaking file handles or timers.
