Go for Infrastructure
Connection reuse: failure analysis
Explain why HTTP/1.1 connections are persistent by default, and how response bodies that are not closed stop connections from returning to the idle pool, so new ones get opened.
What you will be able to do
- Explain how a reused connection is returned to the idle pool.
- Find error paths that skip the response body close, using code search and socket counts.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Go for Infrastructure
- HTTP server timeouts: failure analysisAdvanced · 4 min
Explain which net/http Server timeout covers each phase of a request, and how a missing read timeout lets slow clients hold file descriptors for long periods.
- net/http transport: operational verificationAdvanced · 4 min
Explain what Client.Timeout covers in net/http, why the default client can hang on a silent server, and how transport limits narrow down the stalled phase.