
What's inside net/http? Late binding in the Go standard library
12/21/2015
This post provides a deep dive into the Go standard library's `net/http` client, explaining its connection pooling strategy with a default size of two idle connections per remote host. It highlights the intentional race condition between dialing a new connection and retrieving an idle one, and introduces the concept of 'late binding' as a technique to reduce roundtrip latency. The author also draws parallels to similar mechanisms in Chromium and Cloudflare's Railgun, emphasizing the importance of robust connection management for performance.