{
  "id": 14499433,
  "title": "Better HTTP/1 connection reuse in Go 1.27",
  "url": "https://urgent.news/2026/10/14/better-http-1-connection-reuse-in-go-1-27",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T16:29:33.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://go.dev/blog/http-connection-reuse"
  },
  "original_language": "en",
  "account": "Go developers have long grappled with the complexities of HTTP/1 connection reuse, which can lead to performance degradation in seemingly innocuous code. This issue arises when an HTTP client only cares about an API response's status code, but the response body contains additional information that is never read. When the response body is not fully drained before closing the connection, the connection cannot be reused, causing the client to incur the cost of establishing a new connection for each subsequent request. This can be particularly problematic in cross-region communications, where one-way latencies can reach or exceed 50 ms, making the cost of connection establishment much more significant than the cost of serving the HTTP request itself. Starting with Go 1.27, the net/http package automatically handles this challenge by asynchronously draining an unread HTTP/1 response body for up to 50 ms or 256 KB. This eliminates the need for developers to manually drain response bodies, as they can simply close the body once they are no longer needing it. The Go team has implemented several optimizations to improve performance, such as skipping the draining process when a response contains the \"Connection: close\" header. This change aims to make HTTP connection reuse as simple and straightforward as possible, allowing developers to focus on writing clean and efficient code rather than dealing with the complexities of HTTP protocol nuances.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}