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

vL3 DNS is slow when using the DNS search path #1426

Closed
fr-Pursuit opened this issue Feb 21, 2023 · 2 comments
Closed

vL3 DNS is slow when using the DNS search path #1426

fr-Pursuit opened this issue Feb 21, 2023 · 2 comments
Assignees

Comments

@fr-Pursuit
Copy link

Context

We're using the interdomain vL3 example, with one of the alpine pods renamed to alpine2 to avoid confusion. The vL3 domain names of the alpine pods are therefore:

  • alpine.my-interdomain-vl3-network
  • alpine2.my-interdomain-vl3-network

Expected Behavior

When my-interdomain-vl3-network is in the DNS search path, DNS queries on alpine2 should take roughly the same time as explicit queries on alpine2.my-interdomain-vl3-network.

Current Behavior

DNS queries on alpine2 take around 400ms, while queries on the explicit alpine2.my-interdomain-vl3-network name take less than 50ms.

Steps to Reproduce

  1. Deploy the interdomain vL3 example (while renaming one alpine pod to alpine2 to avoid confusion, setting the NSM_DNS_TEMPLATES environment variable to {{ index .Labels \"podName\" }}.my-interdomain-vl3-network. for the DNS service to work, and adding my-interdomain-vl3-network to alpine's DNS search path)
  2. Open a shell in the alpine pod
  3. Run time nslookup -type=a -debug alpine2.my-interdomain-vl3-network and check the time
  4. Run time nslookup -type=a -debug alpine2 and check the time

Additional context

This problem was diagnosed as part of #1414

The example was deployed on three kind clusters using kind 0.17.0 and the kindest v1.25.3 image

@glazychev-art
Copy link
Contributor

Hi @fr-Pursuit,
Thanks for the report!
We pushed some fixes. Could you please test this on the latest main branch?
After the fix you no longer need to add my-interdomain-vl3-network to client's DNS search path

@fr-Pursuit
Copy link
Author

Hi @glazychev-art !

Without adding my-interdomain-vl3-network to the clients' DNS search path, here's the timings I got from the alpine pod:

/ # time nslookup -type=a -debug alpine2.my-interdomain-vl3-network
Server:         127.0.0.1
Address:        127.0.0.1:53

Query #0 completed in 3ms:
authoritative answer:
Name:   alpine2.my-interdomain-vl3-network
Address: 172.16.0.3

real    0m 0.00s
user    0m 0.00s
sys     0m 0.00s
/ # time nslookup -type=a -debug alpine2
Server:         127.0.0.1
Address:        127.0.0.1:53

Query #0 completed in 10ms:
authoritative answer:
Name:   alpine2.my-interdomain-vl3-network
Address: 172.16.0.3

real    0m 0.01s
user    0m 0.00s
sys     0m 0.00s

The issue seems to be fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants