Node.js interview questions
Show answer
Use streams when data is large or arrives over time — file uploads, CSV exports, proxying responses — so you process it in chunks instead of loading it all into memory.
pipeline()connects streams and handles errors and backpressure (pausing a fast producer when the consumer is slow).