Node.js · Middle · Question 13 of 75
What is backpressure in streams?
- 1Compression applied to slow streams
- ✓Correct answer: A signal that the writable side can't keep up, so the readable side should pause
- 3An error when a stream is read twice
Explanation
writable.write() returns false when its buffer is over highWaterMark. Correct code waits for the drain event. pipe() and pipeline() do this for you.