-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a hybrid RequestStreaming
option that streams requests only if they're larger than X bytes
#2908
Comments
/bounty $250 but has to ship soon because of final release coming up. |
💎 $250 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio-http! Add a bounty • Share on socials
|
/attempt #2908 Options |
/attempt #2908
|
Note The user @abhi267266 is already attempting to complete issue #2908 and claim the bounty. We recommend checking in on @abhi267266's progress, and potentially collaborating, before starting a new solution. |
💡 @Ahmadkhan02 submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
Is your feature request related to a problem? Please describe.
Currently,
zio-http
provides 2 config options forRequestStreaming
:Disabled
(with a maximum number of bytes that the request can be before rejecting it)Enabled
(requests are streamed regardless of size)For servers with low latency / high performance requirements, disabling streaming is a favourable option as it's more performant than streaming the requests. However, in some cases we might want to be able to be able to handle very large requests, so it would be good if
zio-http
provided an option to aggregate the response if it's less than X bytes, and stream it if it's larger than thatDescribe the solution you'd like
Another case class extending
RequestStreaming
similar toDisabled
but instead of failing the request it streams the bytes insteadDescribe alternatives you've considered
Enabling streaming and using a middleware to batch the
ZStream
, but this doesn't perform as well as I would have hopedThe text was updated successfully, but these errors were encountered: