Better HTTP/1 connection reuse
The Go Blog Better HTTP/1 connection reuse Take a look at the following function: 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.…