Skip to content
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

proposal: x/net/http2: add mechanism to adjust TransportDefaultStreamFlow #30277

Closed
jared2501 opened this issue Feb 17, 2019 · 4 comments
Closed

Comments

@jared2501
Copy link

jared2501 commented Feb 17, 2019

What version of Go are you using (go version)?

go version go1.11.2 darwin/amd64

I'd like to be able to adjust a http2 transport's stream-level flow control window. Currently this is hardcoded.

Use case: I'm writing an http2 proxy for a live-streaming use case where downstream subscribers may be operating on LTE or WiFi. The default value for transportDefaultStreamFlow in http2's transport.go is 4MB. This means that the proxy will potentially buffer up to 4MB of data which is non-ideal - I'm serving up video ~300KB chunks from a LIFO queue, so if a downstream connection is slow they will get data that is up to 15 chunks behind!

Note that Go gRPC allows you to adjust the flow control windows (see here).

@odeke-em odeke-em changed the title Add mechanism to adjust http2 transport transportDefaultStreamFlow proposal: x/net/http2: add mechanism to adjust TransportDefaultStreamFlow Feb 17, 2019
@gopherbot gopherbot added this to the Proposal milestone Feb 17, 2019
@odeke-em
Copy link
Member

Thank you for filing this issue @jared2501!

I shall page some folks who might be of help with this proposal @rs @bradfitz @tombergan.

@komuw
Copy link
Contributor

komuw commented Feb 17, 2019

also relevant is this 3yr old comment[1] from Andrew Gerrand;

A separate discussion is the size of that buffer(transportDefaultStreamFlow). It should probably be smaller.

  1. x/net/http2: receive buffer memory usage increases by 400x with HTTP2 #15930 (comment)

@komuw
Copy link
Contributor

komuw commented Feb 17, 2019

this issue is probably a duplicate(or variant) of; #14077

@jared2501
Copy link
Author

Ah yes @komuw, you're right.. will close this issue out and comment on the linked issue

@golang golang locked and limited conversation to collaborators Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants