πNode.js Streams Introduction
Stop loading whole files into memory. Learn each Node.js stream type through runnable snippets and finish by building a streaming CSV-to-JSON transformer with proper backpressure and error handling.
Phase 1Why Streams Beat Buffers
See why streams beat buffers for real work
A 4GB file should not crash your Node server
6 minStreams turn memory problems into time problems.
Four stream types, one mental shape
5 minEvery stream is a pipe: data flows in, data flows out, or both.
Your stream doesn't have to carry bytes
6 minObject mode lets streams carry any JavaScript value, not just Buffers.
The word 'backpressure' is hiding a simple idea
7 minBackpressure is just the consumer telling the producer to slow down.
Phase 2Building Each Stream Type by Hand
Build readable, writable, and transform streams from scratch
A Readable is just push() and a stop condition
7 minImplementing Readable is nothing more than producing chunks until you push null.
A Writable is _write, a callback, and nothing else
7 minCalling the callback is how a Writable participates in backpressure.
A Transform is a Writable plus this.push
7 minTransform streams let you reshape data in one pass without collecting it.
Duplex is two streams glued by a shared resource
5 minA Duplex's input and output are independent β the coupling is the underlying resource.
Every Readable is already an async iterator
6 minModern Node lets you consume streams with for-await-of, and backpressure still works.
Phase 3Piping, Backpressure, and Errors in Production
Wire pipelines with backpressure and error propagation
Stop using .pipe() β start using pipeline()
7 minStop using .pipe() β start using pipeline()
A stream error that nobody listens to crashes your process
7 minA stream error that nobody listens to crashes your process
A production pipeline is three streams and one promise
7 minA production pipeline is three streams and one promise
You can't fix a stream you can't see
7 minYou can't fix a stream you can't see
Phase 4Shipping a Streaming CSV-to-JSON Transformer
Ship a streaming CSV-to-JSON transformer end to end
Ship a streaming CSV-to-JSON transformer with real error handling
20 minShip a streaming CSV-to-JSON transformer with real error handling
Frequently asked questions
- What actually is a Node.js stream and when should I use one?
- This is covered in the βNode.js Streams Introductionβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- Why do developers keep loading whole files instead of using streams?
- This is covered in the βNode.js Streams Introductionβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- What is backpressure and how do Node.js streams handle it?
- This is covered in the βNode.js Streams Introductionβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- How do I propagate errors across piped Node.js streams?
- This is covered in the βNode.js Streams Introductionβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- When should I use pipeline() instead of .pipe() in Node.js?
- This is covered in the βNode.js Streams Introductionβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Related paths
πPython Decorators Introduction
Build one mental model for Python decorators that covers closures, argument passing, functools.wraps, and stacking β then ship a working caching or logging decorator from scratch in under 30 lines.
π¦Rust Lifetimes Explained
Stop reading `'a` as line noise and start reading it as scope arithmetic β one failing snippet at a time β until you can thread lifetimes through a small parser or iterator adapter without fighting the borrow checker.
βΈοΈKubernetes Core Concepts
Stop drowning in 30+ resource types. Build the mental model one primitive at a time -- pods, deployments, services, ingress, config -- then deploy a real app with rolling updates and health checks.
πBig O Intuition
Stop treating Big O as math you memorized for an interview β build the intuition to spot O(nΒ²) disasters, pick the right data structure without thinking, and rewrite a slow function from O(nΒ²) to O(n) in under five minutes.