Backpressure occurs when the writable stream cannot handle data as fast as it's being produced by the readable stream.
To handle it, you can use flow control mechanisms like pause() and resume() methods or set the highWaterMark option when creating a readable stream.
You need to pipe a large file read stream into an HTTP response. How would you make sure the server doesn’t run out of memory?
If the writable stream’s write() method returns false, what does that tell you and what should you do next?
What can happen if you ignore backpressure when reading from a fast source and writing to a slow destination?
During a data migration you built a pipeline with Transform streams, but it stalls under load. Walk me through how you’d debug the backpressure issue.
After adding a compression Transform stream to a file‑upload endpoint, requests started timing out. How would you modify the code to handle backpressure correctly?
A readable stream is emitting data faster than the downstream consumer can process. How would you throttle or buffer to keep the pipeline stable?
Design a high‑throughput logging service that writes logs to disk using streams. How would you architect backpressure handling to avoid dropping logs during traffic spikes?
In a microservice that streams video chunks to many clients, how would you balance backpressure across concurrent streams while keeping latency low?
When integrating a third‑party API that provides a readable stream, you need to merge it with other streams. What strategies would you use to propagate backpressure correctly across the whole chain?
Our legacy monolith uses custom event emitters for data flow, and we plan to migrate to Node.js streams for better flow control. How would you approach the migration to ensure backpressure semantics are preserved across services?
Several teams share a streaming library that many services depend on. What guidelines and abstractions would you establish to make backpressure handling consistent and future‑proof?
We expect to scale the platform to handle billions of events per day. How would you redesign the streaming infrastructure to handle backpressure at the cluster level, considering load balancing and fault tolerance?