Better HTTP/1 connection reuse in Go 1.27

Nicholas Husin and Damien Neil 14 October 2026
func getStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCode, nil } It sends a GET request to url and returns the HTTP status code.
Using HTTP/1 ( GODEBUG=http2client=0 ), calling this function 100 times against index.golang.org takes ~710 milliseconds on Go 1.26 on my machine. On Go 1.27, the same program takes ~150 milliseconds.
That is almost 5 times faster! How is such a drastic performance difference possible?
To understand the difference, consider what happens on the network when we make an HTTP request.
Go's net/http package supports HTTP/1.0, HTTP/1.1, and HTTP/2. All three run over TCP, and usually over TLS when talking to HTTPS endpoints. Making a request over a new connection looks something like this:
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in