TLDR Tech / Practical
Go 1.27 enhances HTTP/1 connection reuse
The net/http.Transport in Go 1.27 now automatically handles unread HTTP/1 response bodies asynchronously. This prevents connections from being closed unnecessarily and boosts performance. Previously, incomplete reads of response bodies led to connection abandonment, requiring new TCP and TLS handshakes for subsequent requests. The updated transport discards up to 256 KB or waits for 50 ms, enabling efficient HTTP/1 connection reuse without extra effort from developers.
Read the full story