feat: add non-buffered response streaming#2082
Open
GrahamCampbell wants to merge 2 commits into
Open
Conversation
Allow streaming output operations to opt out of response buffering so large downloads can be consumed without temp storage while keeping buffered behavior as the default.
Regenerate service inputs to document @responseBuffer consistently and bump affected service packages to the core version that supports the option.
Contributor
Author
|
Hmmm, tough to test due to the cyclic nature of needing a newer version of core... |
Member
|
I would avoid creating precedence by adding a new custom I didn't yet read the implementation, but some replacement suggestion in mind
|
Contributor
Author
|
Yes, we do want to buffer the output in general by default (and by default, small responses buffer entirely in memory without spilling to disk anyway). Without buffering it, we can't read it more than once, and there are many situations where we would want to do that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow streaming output operations to opt out of response buffering so large downloads can be consumed without temp storage while keeping buffered behavior as the default. My use case is streaming a large CSV file out of S3. Without this change, I have to go around the SDK and create a presigned URL and download it myself using another HTTP client. Without the ability to turn off buffering, the entire file gets written to
/tmp.