What's inside net/http? Late binding in the Go standard library
The Go programming language's standard library maintains a connection pool for each remote host that supports Connection: keep-alive to minimize roundtrip latency. When making an HTTP request, two goroutines race to establish a new connection or retrieve an idle one from the pool. Late binding is used in Chromium and CloudFlare's Railgun to ensure quick response times by prioritizing available connections. Connection pooling and late binding can be crucial for reducing latency as long as proper cleanup of bad connections and cancelled requests is ensured.
Company
Cloudflare
Date published
Dec. 21, 2015
Author(s)
Matthew C
Word count
535
Hacker News points
None found.
Language
English