Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension generates huge amounts of DNS traffic #1292

Closed
boeremak opened this issue Sep 20, 2019 · 5 comments
Closed

Extension generates huge amounts of DNS traffic #1292

boeremak opened this issue Sep 20, 2019 · 5 comments
Labels

Comments

@boeremak
Copy link

boeremak commented Sep 20, 2019

Hi,

Whenever I have the docker extension tab open in VS Code it generates huge amounts of DNS traffic. Like every second it will resolve the docker host it seems.

I don't know why, but it seems a bit excessive.

Is this a known issue?

I tested it by closing the tab and reopening it again while running tcpdump port 53 on the host.

14:02:58.555296 IP (tos 0x0, ttl 64, id 4595, offset 0, flags [DF], proto UDP (17), length 74) computer1.37430 > 45387544169d.domain: 34017+ AAAA? computer2. (46) 14:02:58.556758 IP (tos 0x0, ttl 64, id 60761, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.37430: 34017* 0/0/0 (46) 14:02:59.555871 IP (tos 0x0, ttl 64, id 4783, offset 0, flags [DF], proto UDP (17), length 74) computer1.43205 > 45387544169d.domain: 37882+ AAAA? computer2. (46) 14:02:59.557476 IP (tos 0x0, ttl 64, id 60987, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.43205: 37882* 0/0/0 (46) 14:02:59.558387 IP (tos 0x0, ttl 64, id 4784, offset 0, flags [DF], proto UDP (17), length 74) computer1.54991 > 45387544169d.domain: 37631+ AAAA? computer2. (46) 14:02:59.559639 IP (tos 0x0, ttl 64, id 60988, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.54991: 37631* 0/0/0 (46) 14:03:00.557342 IP (tos 0x0, ttl 64, id 4979, offset 0, flags [DF], proto UDP (17), length 74) computer1.48462 > 45387544169d.domain: 20099+ AAAA? computer2. (46) 14:03:00.558728 IP (tos 0x0, ttl 64, id 61220, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.48462: 20099* 0/0/0 (46) 14:03:00.559082 IP (tos 0x0, ttl 64, id 4980, offset 0, flags [DF], proto UDP (17), length 74) computer1.51060 > 45387544169d.domain: 16870+ AAAA? computer2. (46) 14:03:00.560197 IP (tos 0x0, ttl 64, id 61221, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.51060: 16870* 0/0/0 (46) 14:03:01.558345 IP (tos 0x0, ttl 64, id 5065, offset 0, flags [DF], proto UDP (17), length 74) computer1.34690 > 45387544169d.domain: 35754+ AAAA? computer2. (46) 14:03:01.559449 IP (tos 0x0, ttl 64, id 61227, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.34690: 35754* 0/0/0 (46) 14:03:01.559894 IP (tos 0x0, ttl 64, id 5066, offset 0, flags [DF], proto UDP (17), length 74) computer1.57271 > 45387544169d.domain: 41870+ AAAA? computer2. (46) 14:03:01.560733 IP (tos 0x0, ttl 64, id 61228, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.57271: 41870* 0/0/0 (46) 14:03:02.559186 IP (tos 0x0, ttl 64, id 5133, offset 0, flags [DF], proto UDP (17), length 74) computer1.56776 > 45387544169d.domain: 54764+ AAAA? computer2. (46) 14:03:02.560743 IP (tos 0x0, ttl 64, id 61260, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.56776: 54764* 0/0/0 (46) 14:03:02.561055 IP (tos 0x0, ttl 64, id 5134, offset 0, flags [DF], proto UDP (17), length 74) computer1.58752 > 45387544169d.domain: 17352+ AAAA? computer2. (46) 14:03:02.562655 IP (tos 0x0, ttl 64, id 61261, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.58752: 17352* 0/0/0 (46) 14:03:03.559994 IP (tos 0x0, ttl 64, id 5329, offset 0, flags [DF], proto UDP (17), length 74) computer1.42790 > 45387544169d.domain: 37436+ AAAA? computer2. (46) 14:03:03.561522 IP (tos 0x0, ttl 64, id 61415, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.42790: 37436* 0/0/0 (46) 14:03:04.561236 IP (tos 0x0, ttl 64, id 5362, offset 0, flags [DF], proto UDP (17), length 74) computer1.56471 > 45387544169d.domain: 39504+ AAAA? computer2. (46) 14:03:04.562809 IP (tos 0x0, ttl 64, id 61499, offset 0, flags [DF], proto UDP (17), length 74) 45387544169d.domain > computer1.56471: 39504* 0/0/0 (46)

And so on.

OS: Kubuntu 19. Latest VS Code.

Edit: I really do like the extension, thanks for making it.

@ejizba
Copy link
Member

ejizba commented Sep 20, 2019

Likely duplicate of #1225 (not sure why that one was closed).

As mentioned there, you can modify docker.explorerRefreshInterval. It defaults to 1 second, which I agree seems excessive

@boeremak
Copy link
Author

boeremak commented Sep 21, 2019

I don't really mind the refresh speed, it is just that my host does not change its IP address every second. :) Is it possible to just cache the IP address of the docker host?

I'll take a look, thanks.

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Oct 21, 2019

I can reproduce. It seems to be a long-standing, controversial issue with Node itself, wherein for every single HTTP request it does a DNS lookup: nodejs/node#5893 ?

From what I understand, in order to actually make use of caching, it sounds like one must configure a system-wide DNS cache (e.g. dnsmasq) or otherwise, use userland packages like dnscache.

It would be possible for docker-modem to resolve it by using dnscache but I will leave that decision to docker-modem.

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Oct 21, 2019

@boeremak I filed apocas/docker-modem#111 for docker-modem to consider doing DNS caching for their HTTP requests (or making it an option). In the meantime, you can reduce the refresh speed if you want, or set up a local DNS cache.

@bwateratmsft
Copy link
Contributor

I'll close this one as external to apocas/docker-modem#111; and we can consider changing the refresh speed in #1351.

@bwateratmsft bwateratmsft removed their assignment Oct 21, 2019
@bwateratmsft bwateratmsft removed this from the 0.9.0 milestone Oct 21, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants