apocas / docker-modem

Docker Remote API network stack driver.
Apache License 2.0
234 stars 112 forks source link

Consider using dnscache for caching DNS requests #111

Open bwateratmsft opened 5 years ago

bwateratmsft commented 5 years ago

This came up from https://github.com/microsoft/vscode-docker/issues/1292 originally. It seems like Node.js does DNS lookups every single HTTP request: https://github.com/nodejs/node/issues/5893

Supposedly, this can be resolved by configuring a system-wide DNS cache, or using packages like dnscache.

Can docker-modem make use of that package, or make it an option, in order to reduce DNS traffic in things like the vscode-docker extension?

karolz-ms commented 5 years ago

Another approach is to leverage https://github.com/nodejs/node/pull/9296 to retrieve TTL information about DNS records and not repeat the resolution until the record has expired.