Streaming Responses (SSE/Chunked) Overview
On this page
Streaming Responses
HTTP responses are writable streams. Streaming enables sending partial data without waiting for full computation.
res.write('chunk 1');
res.write('chunk 2');
res.end();
Production Benefits
Streaming reduces memory usage and improves perceived latency. It is essential for large exports and server-sent events.
Architectural Insight
Combine streaming with backpressure awareness to build scalable APIs under heavy load.