General Tech

Better HTTP/1 connection reuse in Go 1.27

The Go team has improved the connection reuse in the HTTP/1 client in Go 1.27. Connection reuse is a technique that allows the HTTP client to reuse existing TCP connections to reduce the overhead of opening and closing new connections for each request. The new implementation uses a new connection pool that is shared across the Go runtime, and it allows for a maximum of 128 connections to be reused. The team also improved the handling of proxy servers, allowing them to be configured per-host and per-target. Additionally, the implementation includes a new 'http2h2c' transport, which uses HTTP/2 over a plain TCP connection, and it also supports the 'http2h2c' transport for HTTP/2 connections. The updates are part of Go 1.27, which is currently available as a beta release.

Read the full article at go.dev →