Guia de entrevista · Node.js

What are Node.js streams?

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de Node.js2 min

Resposta curta e em inglês, para ler, fechar e treinar em voz alta.

A resposta, como você fala na entrevista

Streams process data in CHUNKS instead of loading everything into memory. Use them for large files: read a piece, process it, move on. Memory can stay bounded independently of the total file size when each stage respects backpressure and does not accumulate chunks. Ignoring write() returning false or collecting every chunk can make memory grow with the input. highWaterMark is a buffering threshold, not a hard memory limit.

The 4 types: Readable (a source: file read, HTTP request), Writable (a destination: file write, HTTP response), Duplex (both: TCP socket), Transform (a Duplex that MODIFIES data passing through: gzip, encryption).

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app