-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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: net/http: a configurable write buffer size for the http server #68149
Comments
Let's just keep the conversation in #13870 |
Change https://go.dev/cl/594196 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal Details
The Go
http.Server
currently uses a hard coded 4 KB buffer for the response writer. In some cases, developers of certain applications may prefer increasing the default 4 KB for higher throughput and better performance.This has been discussed previously at #13870 and at https://groups.google.com/g/golang-dev/c/OuFtcKEyGrg
The performance with the default 4 KB buffer size:
The performance with a 10 KB buffer size:
Proposed solution:
Add a configurable
WriteBufferSize
option to thehttp.Server
struct, which then the HTTP server will use when set instead of the hard coded4 << 10
value.I have recently opened a pull request that possibly addresses this #68143
The text was updated successfully, but these errors were encountered: