Understanding Streams, Signals and Events in Nodejs
summary
Examines Node.js source (lib JS and src C++) and shows concrete behavior: creating write streams with fs.createWriteStream, using cork, write returning a boolean that signals backpressure and drain, and piping via pipeline which handles drains for you; shows SIGINT is catchable but SIGKILL is not, inspects process metadata and signals handling, runs file benchmarks writing 100,000 and 200,000 rows to demonstrate performance, and points out that console.log is itself a stream which can stall tight loops.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 3:11Streams signals and events matter
- 6:03Basic Node.js concepts
- 7:06What is a stream
- 8:10Pipelines and back pressure
- 10:19Processes threads memory
- 11:46Event-driven architecture
- 13:32Process and signals deep dive
- 16:53Node.js signals source code
- 18:19Streams most powerful concept
- 22:20File streaming demo
- 24:51Back pressure write streams
- 26:36Process next tick event loop
- 28:20HighWaterMark chunks
- 29:45Pipeline seamless data flow
- 31:09Console.log stream impact
- 32:15Live demo closing








