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

high response time when using go-dnsmasq #30

Open
odedpriva opened this issue Dec 10, 2017 · 3 comments
Open

high response time when using go-dnsmasq #30

odedpriva opened this issue Dec 10, 2017 · 3 comments

Comments

@odedpriva
Copy link

odedpriva commented Dec 10, 2017

Hi,

I'm using go-dnsmasq as a sidecar for nginx,

when using go-dnsmasq to query a k8s service the response time about 0.5 sec

Server:		localhost
Address:	127.0.0.1#53

Name:	vault.default.svc.cluster.local
Address: 100.68.156.43


real	0m1.010s
user	0m0.004s
sys	0m0.004s

verbose logs

time="2017-12-10T16:30:32Z" level=debug msg="[63317] Doing absolute lookup" 
time="2017-12-10T16:30:32Z" level=debug msg="[63317] Querying upstream 100.64.0.10:53 for qname 'vault.default.svc.cluster.local.'" 
time="2017-12-10T16:30:32Z" level=debug msg="[63317] Response code from upstream: NOERROR" 
time="2017-12-10T16:30:32Z" level=debug msg="[63317] Absolute lookup yielded result. Response to client: NOERROR" 
time="2017-12-10T16:30:32Z" level=debug msg="[63317] Response time: **767.279**µs" 

when querying k8s directly :

root@management-proxy:/# time nslookup vault 100.64.0.10
Server:		100.64.0.10
Address:	100.64.0.10#53

Name:	vault.default.svc.cluster.local
Address: 100.68.156.43


real	0m0.008s
user	0m0.004s
sys	0m0.000s

container configuration:

  - name: dnsmasq
    image: janeczku/go-dnsmasq:release-1.0.7
    args:
      - --listen
      - "127.0.0.1:53"
      - --hostsfile=/etc/hosts
      - --verbose

any suggestion ?

@odedpriva
Copy link
Author

same result when querying google.com

root@management-proxy:/# time nslookup google.com 100.64.0.10
Server:		100.64.0.10
Address:	100.64.0.10#53

Non-authoritative answer:
Name:	google.com
Address: 209.85.202.100
Name:	google.com
Address: 209.85.202.101
Name:	google.com
Address: 209.85.202.102
Name:	google.com
Address: 209.85.202.113
Name:	google.com
Address: 209.85.202.138
Name:	google.com
Address: 209.85.202.139


real	0m0.011s
user	0m0.000s
sys	0m0.008s
root@management-proxy:/# time nslookup google.com localhost
Server:		localhost
Address:	127.0.0.1#53

Non-authoritative answer:
Name:	google.com
Address: 209.85.202.139
Name:	google.com
Address: 209.85.202.100
Name:	google.com
Address: 209.85.202.101
Name:	google.com
Address: 209.85.202.102
Name:	google.com
Address: 209.85.202.113
Name:	google.com
Address: 209.85.202.138


real	0m5.016s
user	0m0.004s
sys	0m0.004s

@r0l1
Copy link

r0l1 commented Dec 19, 2017

Can confirm this issue.

@r0l1
Copy link

r0l1 commented Dec 19, 2017

This is not an issue with go-dnsmasq. This is an issue with nslookup.

Try:

time nslookup google.com 127.0.0.1

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

No branches or pull requests

2 participants