Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: consider adding configurable buffer sizes to Transport #22618
What version of Go are you using (
changed the title from
Provide configurable buffer size in http.Client
net/http: consider adding configurable buffer sizes to Transport
Nov 7, 2017
referenced this issue
Sep 29, 2018
FWIW, I would also prefer the default to be automatic tuning. Pardon the handwaving but maybe something like:
Ideally such heuristics should be then refined with information about the actual throughput of the connection (there's no point increasing the buffer if the actual throughput is very low).
This is a great idea. Is it confirmed for inclusion in 1.12?
One minor point: IIRC, when using HTTPS there's effectively a 16k buffer that kicks in as part of the TLS processing:
What is? There's nothing concrete proposed here yet.
Nothing is confirmed. But I wanted to understand the problem and options more at least for 1.12. Not sure if there will be time to do something about it.
Back at the start of this thread, isn't there a concrete proposal here: https://go-review.googlesource.com/#/c/go/+/76410/
Having said that, a simpler option could be to just change the default size up to 16K from the current 4k. Based on my own testing, I would expect even that to make a significant difference in CPU usage and/or throughput for high-throughput cases (i.e. in the multi-gigabit range).