Je peux envoyer un ping à l'hôte :
dig registry.mynet
Et le serveur DNS fait ce qu'on attend de lui :
dnsmasq[1]: 895 127.0.0.1/44580 query[A] registry.mynet from 127.0.0.1
dnsmasq[1]: 895 127.0.0.1/44580 /etc/hosts registry.mynet is 42.42.42.42
Mais si je tente une requête plus complexe, cela prend beaucoup de temps :
» time http -h http://registry.mynet/v2/_catalog?n=100
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 97
Content-Type: application/json; charset=utf-8
Date: Fri, 23 Mar 2018 10:42:13 GMT
Docker-Distribution-Api-Version: registry/2.0
Server: nginx/1.13.9
X-Content-Type-Options: nosniff
real 0m15.297s
user 0m0.252s
sys 0m0.028s
Et cela n'a rien à voir avec le service (qui est très réactif). C'est parce que le serveur DNS fait quelque chose d'étrange :
dnsmasq[1]: 887 127.0.0.1/53345 query[A] registry.mynet from 127.0.0.1
dnsmasq[1]: 887 127.0.0.1/53345 /etc/hosts registry.mynet is 42.42.42.42
dnsmasq[1]: 888 127.0.0.1/53345 query[AAAA] registry.mynet from 127.0.0.1
dnsmasq[1]: 888 127.0.0.1/53345 forwarded registry.mynet to 208.67.220.220
dnsmasq[1]: 888 127.0.0.1/53345 forwarded registry.mynet to 8.8.4.4
dnsmasq[1]: 888 127.0.0.1/53345 forwarded registry.mynet to 8.8.8.8
dnsmasq[1]: 888 127.0.0.1/53345 forwarded registry.mynet to 8.8.8.8
dnsmasq[1]: 889 127.0.0.1/53345 query[A] registry.mynet from 127.0.0.1
dnsmasq[1]: 889 127.0.0.1/53345 /etc/hosts registry.mynet is 42.42.42.42
dnsmasq[1]: 890 127.0.0.1/53345 query[AAAA] registry.mynet from 127.0.0.1
dnsmasq[1]: 890 127.0.0.1/53345 forwarded registry.mynet to 208.67.220.220
dnsmasq[1]: 890 127.0.0.1/53345 forwarded registry.mynet to 8.8.4.4
dnsmasq[1]: 890 127.0.0.1/53345 forwarded registry.mynet to 8.8.8.8
dnsmasq[1]: 890 127.0.0.1/53345 forwarded registry.mynet to 8.8.8.8
dnsmasq[1]: 891 127.0.0.1/41484 query[A] registry.mynet from 127.0.0.1
dnsmasq[1]: 891 127.0.0.1/41484 /etc/hosts registry.mynet is 42.42.42.42
dnsmasq[1]: 892 127.0.0.1/58752 query[AAAA] registry.mynet from 127.0.0.1
dnsmasq[1]: 892 127.0.0.1/58752 forwarded registry.mynet to 208.67.220.220
dnsmasq[1]: 892 127.0.0.1/58752 forwarded registry.mynet to 8.8.4.4
dnsmasq[1]: 892 127.0.0.1/58752 forwarded registry.mynet to 8.8.8.8
dnsmasq[1]: 892 127.0.0.1/58752 forwarded registry.mynet to 8.8.8.8
J'ai deux questions à poser :
- le serveur DNS trouve la bonne réponse (
/etc/hosts registry.mynet is 42.42.42.42
) : pourquoi la transformation se poursuit-elle ? - que signifient les entrées "transférées" ?