DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Better HTTP/1 connection reuse

Quality: 9/10 Relevance: 9/10

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.

🚀 Service construit par Johan Denoyer