|
|
|
|
|
by __turbobrew__
597 days ago
|
|
You nerd sniped me. The guts of how http2 deals with this in golang is in transport.go :
https://github.com/golang/go/blob/master/src/net/http/transp... If I’m reading the code right round trips (HTTP requests) go through queueForIdleConn which picks up any pre-existing connections to a host. The only time these connections are cleaned up (in HTTP2) is if keepalives are turned off and the connection has been idle for too long OR the connection breaks in some way OR the max number of connections is hit LRU cache evictions take place. Furthermore, the golang dnsclient doesn’t even expose record TTLs to callers so how could the HTTP2 transport know when an entry is stale?
https://github.com/golang/go/blob/master/src/net/dnsclient_u... |
|