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

x/net/http2: export more tunable knobs #14077

Open
ayanamist opened this issue Jan 23, 2016 · 1 comment
Open

x/net/http2: export more tunable knobs #14077

ayanamist opened this issue Jan 23, 2016 · 1 comment
Milestone

Comments

@ayanamist
Copy link

There are several default window settings in transport.go:

    // transportDefaultConnFlow is how many connection-level flow control
    // tokens we give the server at start-up, past the default 64k.
    transportDefaultConnFlow = 1 << 30

    // transportDefaultStreamFlow is how many stream-level flow
    // control tokens we announce to the peer, and how many bytes
    // we buffer per stream.
    transportDefaultStreamFlow = 4 << 20

    // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send
    // a stream-level WINDOW_UPDATE for at a time.
    transportDefaultStreamMinRefresh = 4 << 10

NewClientConn method will use these without looking up other places. However, these default values are not suitable for all situations like high-latency high-throughput network.

Can you provide some setters to change these values instead of rewrite the whole thing using Framer or forking and rewriting this repo?

@bradfitz bradfitz changed the title x/net/http2:default window size can be changed x/net/http2: export more tunable knobs Jan 23, 2016
@bradfitz bradfitz added this to the Unplanned milestone Jan 23, 2016
@bradfitz bradfitz self-assigned this Jan 23, 2016
@jared2501
Copy link

jared2501 commented Feb 20, 2019

Hey @bradfitz - this would be very handy. As mentioned in #30277, the default settings are too high if you have a low-latency requirement on a proxy that proxies a fast link into a slow link (i.e. I'm streaming live video over HTTP/2 through a Go proxy to LTE clients).

Current work around is to fork net/http2. Would be great to put these on the http2.Transport. Would you accept PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants