Skip to content

proposal: net/http: make buffer size or buffer pool in copyBufPool configurable #76323

@Keynib

Description

@Keynib

Proposal Details

The net/http/server.go implementation uses an internal, unexported buffer pool with a fixed size (copyBufPoolSize = 32 * 1024). This value is hard-coded and cannot be adjusted or replaced by users.

For some workloads, especially high-throughput reverse proxies or systems working with large payloads, the default buffer size may be suboptimal. It would be beneficial to allow customizing this behavior. The bigger buffer size allows reducing the amount number of system calls and improve performance.

I think some kind of ReverseProxy Buffer Pool may be used here.

Linked issues

#57202

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolPerformanceProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions