What is highWaterMark actually controlling? And when you flip on objectMode, what changes about how it counts?
A strong answer knows highWaterMark is a soft threshold whose units change by mode, and can do the objectMode memory math the count-based default hides
highWaterMark is basically the buffering threshold for a stream. On a writable, once the buffered data reaches it, write() starts returning false and the producer is supposed to wait for 'drain'. On a readable it's how much the stream pre-reads into its internal buffer before it pauses the underlying source. The default is 64KiB for byte streams, I believe. And it's a soft threshold, you can keep writing past it and the stream just keeps buffering. With objectMode: true the units change from bytes to objects, and the default becomes 16, so sixteen objects buffered no matter how big each one is. That's the classic gotcha, sixteen large objects can be a ton of memory even though sixteen sounds small. Tuning it is a memory versus throughput thing, bigger buffers mean fewer pauses and larger reads, smaller ones keep memory tight.