Better HTTP/1 connection reuse
Summary
Go 1.27 improves HTTP connection reuse by having net/http.Transport drain unread HTTP/1 responses automatically for up to 50 ms or 256 KB. This reduces the cost of establishing new TCP/TLS connections and yields measurable latency improvements in HTTP/1 requests. The article also covers the historical workaround of draining bodies and why relying on the library ultimately produces simpler, faster code.