Search lands in PR-5.1 (Pagefind).

Explanation Intermediate

Chapter 11 Updated

Streams & Buffers

Why Node moves bytes in streams, and what backpressure really is.

  • Full 35m
  • Revision 4m
  • Flow 2m

Backpressure in a pipeline

flowchart LR
    A[Readable — source] -->|chunks| B[Internal buffer]
    B --> C{buffer < HWM?}
    C -->|yes| D[write chunk to Writable]
    C -->|no| E[write returns false]
    E --> F[pause Readable]
    D --> G[Writable consumer]
    G -->|drained| H[emit drain]
    H --> I[resume Readable]
    I --> A

pipe wires this loop for you — the pause / resume dance happens without explicit event handlers in your code.

Comments

Comments are disabled in this environment. Set PUBLIC_GISCUS_REPO, PUBLIC_GISCUS_REPO_ID, and PUBLIC_GISCUS_CATEGORY_ID to enable.