A Writable stream’s write() returns an advisory boolean: true indicates room remains; false means its buffer has exceeded highWaterMark. Keep writing after false, and chunks accumulate, increasing memory use and garbage-collection costs; the signal does not enforce a limit. section 10.3.1
const writable = getWritableSomehow();
if (!writable.write('something')) {
// Buffer is full, stop writing until drain
writable.on('drain', () => {
// Safe to resume writing
});
}Check write()’s return value and resume writing only after the Writable emits 'drain'. section 10.3.1


