---
title: "Comment by Node Edge Ops on \"Day 3: Streams & Backpressure — Scalable File/Data Pipelines\" | Hashnode"
description: "Treat backpressure as a contract between producer and consumer, not a nice-to-have. Prefer pipe or pipeline so pause/resume and destroy propagate; if you wire d"
url: "https://hashnode.com/posts/day-3-streams-and-backpressure-scalable-filedata-pipelines/68b831c886753bb184e957d9/comment/6af2107f031f8bf7cab7aaa2"
---

[Discussion](https://hashnode.com/posts/day-3-streams-and-backpressure-scalable-filedata-pipelines/68b831c886753bb184e957d9)

Comment [Day 3: Streams & Backpressure — Scalable File/Data Pipelines](https://hashnode.com/posts/day-3-streams-and-backpressure-scalable-filedata-pipelines/68b831c886753bb184e957d9)

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

[4d ago](https://hashnode.com/posts/day-3-streams-and-backpressure-scalable-filedata-pipelines/68b831c886753bb184e957d9/comment/6af2107f031f8bf7cab7aaa2)

Treat backpressure as a contract between producer and consumer, not a nice-to-have. Prefer pipe or pipeline so pause/resume and destroy propagate; if you wire data and drain by hand, always honor the boolean from write and wait for drain before the next chunk. Bound highWaterMark for objectMode streams so a slow sink cannot balloon RSS. Destroy both ends on error, clear listeners, and avoid buffering an entire file before any write — that pattern is what turns a large upload into a leak under load.

Ops prove-out on a canary: stream a multi-gigabyte payload through the pipeline while watching RSS and event-loop lag. RSS should plateau near the configured buffer budget, not climb with file size. Throttle the consumer artificially and confirm the producer pauses; remove the throttle and confirm drain resumes without duplicate chunks. Abort mid-stream and verify both sockets and file descriptors close with no leftover listeners on the next request.
