You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if this value was configurable, because in Docker, if you restart a container, any linked containers have their /etc/hosts file updated.
The text was updated successfully, but these errors were encountered:
rsc
changed the title
lookupStaticHost is cached for 5 minutes, make it configurable
net: lookupStaticHost caches for too long for Docker
Dec 28, 2015
What kinds of names are in the /etc/hosts file in Docker? Do they look like fully-qualified names? It would be nice to avoid stat'ing the /etc/hosts file for all the regular DNS lookups. But if we had some way to tell, from looking at the name, that it was likely to come from /etc/hosts, we could make the lookup more aggressive about noticing changed /etc/hosts in that case.
The hostnames could be arbitrary, so I don't think you could tell from just looking at the hostname.
stat'ing the host file on every DNS lookup seems pretty expensive. But if we stat'ed the /etc/hosts file, say, every 5 or 10 seconds, that would be a big improvement over waiting 5 minutes.
https://golang.org/src/net/hosts.go#L12
It would be nice if this value was configurable, because in Docker, if you restart a container, any linked containers have their /etc/hosts file updated.
The text was updated successfully, but these errors were encountered: