Mid-levelMid (3–6 yrs)AWSNode.jsAmazonDropboxSpotify
Node streams pipeline
Explain how you stream a large file upload to S3 in Node without loading it into memory. Include backpressure.
Answers use simple, clear English.
Quick interview answer
Use multipart/busboy or req as Readable. Pipe through PassThrough/transform if needed. Use AWS SDK upload with Body stream.
Detailed answer
Use multipart/busboy or req as Readable. Pipe through PassThrough/transform if needed. Use AWS SDK upload with Body stream. Prefer stream.promises.pipeline for error cleanup. Respect backpressure: if write returns false, wait for drain. Never Buffer.concat entire file.
Real example & use case
User uploads 2GB video; API streams to S3 multipart upload.
Pros & cons
Pros: constant memory. Cons: harder error recovery mid-stream.
#nodejs#streams#s3