Welcome! Log In Create A New Profile

Advanced

Re: DNS Caching Issue For community version

Francis Daly
May 16, 2016 07:06PM
On Fri, May 13, 2016 at 02:13:05AM -0400, RT.Nat wrote:

Hi there,

why do you think that this does not work?

As in: what request do you make that give you an unexpected response? And
can you also show the "dig" command that shows that the nominated dns
server has changed the resolution address that it provides?

> I tried adding the variable for resolving the dns but still the ip address
> does not changes. Is there any other way? or is there any bug in my script.

When I use:

==
http {
server {
listen 8080;
resolver 8.8.8.8 valid=20s;
set $up "www.example.net";
location / {
proxy_pass http://$up;
}
}
}
==

I can do:

date; while :; do curl http://127.0.0.1:8080/; sleep 3; done

and I can also do

tcpdump -nn port 53

and the first command shows the remote web server content every few
seconds, while the second command show that a new dns request is made
more than 20 seconds after the previous one:

===
21:31:00.572450 IP 192.168.224.128.52862 > 8.8.8.8.53: 12516+ A? www.example.net. (33)
21:31:00.631578 IP 8.8.8.8.53 > 192.168.224.128.52862: 12516 1/0/0 A 93.184.216.34 (49)
21:31:23.829429 IP 192.168.224.128.52862 > 8.8.8.8.53: 5096+ A? www.example.net. (33)
21:31:23.873474 IP 8.8.8.8.53 > 192.168.224.128.52862: 5096 1/0/0 A 93.184.216.34 (49)
21:31:47.135984 IP 192.168.224.128.52862 > 8.8.8.8.53: 37996+ A? www.example.net. (33)
21:31:47.165754 IP 8.8.8.8.53 > 192.168.224.128.52862: 37996 1/0/0 A 93.184.216.34 (49)
===

Now, I don't control the google name server, and I can't make
www.example.net get an updated address at will; but the above does seem
to show that the nginx resolver is making a fresh dns request when it
is supposed to.

Do you see something else in your test?

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

DNS Caching Issue For community version

RT.Nat May 12, 2016 05:36AM

Re: DNS Caching Issue For community version

unixro May 12, 2016 05:52AM

Re: DNS Caching Issue For community version

RT.Nat May 12, 2016 06:01AM

RE: DNS Caching Issue For community version

Lukas Tribus May 12, 2016 06:06AM

Re: RE: DNS Caching Issue For community version

RT.Nat May 12, 2016 06:11AM

Re: DNS Caching Issue For community version

unixro May 12, 2016 06:52AM

Re: DNS Caching Issue For community version

RT.Nat May 13, 2016 02:13AM

Re: DNS Caching Issue For community version

Daniel Biazus May 15, 2016 05:04PM

Re: DNS Caching Issue For community version

RT.Nat May 16, 2016 12:27AM

Re: DNS Caching Issue For community version

wandenberg May 16, 2016 06:28AM

Re: DNS Caching Issue For community version

Francis Daly May 16, 2016 07:06PM

Re: RE: DNS Caching Issue For community version

Maxim Dounin May 12, 2016 07:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready