Mikhail Morfikov
2016-07-01 13:03:43 UTC
In the dnsmasq confg file I can set the two following parameters:
min-cache-ttl=3600
max-cache-ttl=7200
Let's say I visit some http server on the internet. The cache entry would be
created for the domain and for 1h, each request to that domain would be served
from the cache, right?
What if the IP address associated with the domain changes for some reason in
10min. after my first visit? What would dnsmasq do if I tried to access the web
server once more after 15min? Some people say that I would have wrong IP so I
couldn't connect to the web server till the cache entry expires. But I've never
had this problem and all web pages works fine with the above values, at least I
think so.
I can see some retried or failed queries in the following log:
dnsmasq[1612]: cache size 10000, 0/4284 cache insertions re-used unexpired cache
entries.
dnsmasq[1612]: queries forwarded 4508, queries answered locally 6386
dnsmasq[1612]: queries for authoritative zones 0
dnsmasq[1612]: server 192.168.1.1#53: queries sent 0, retried or failed 0
dnsmasq[1612]: server 208.67.222.222#53: queries sent 59, retried or failed 0
dnsmasq[1612]: server 127.0.2.1#5353: queries sent 4449, retried or failed 60
dnsmasq[1612]: time 1467180121
But I don't really know what means "retried or failed 60". So did it fail or
not? Is it because of the high TTL values or something else?
min-cache-ttl=3600
max-cache-ttl=7200
Let's say I visit some http server on the internet. The cache entry would be
created for the domain and for 1h, each request to that domain would be served
from the cache, right?
What if the IP address associated with the domain changes for some reason in
10min. after my first visit? What would dnsmasq do if I tried to access the web
server once more after 15min? Some people say that I would have wrong IP so I
couldn't connect to the web server till the cache entry expires. But I've never
had this problem and all web pages works fine with the above values, at least I
think so.
I can see some retried or failed queries in the following log:
dnsmasq[1612]: cache size 10000, 0/4284 cache insertions re-used unexpired cache
entries.
dnsmasq[1612]: queries forwarded 4508, queries answered locally 6386
dnsmasq[1612]: queries for authoritative zones 0
dnsmasq[1612]: server 192.168.1.1#53: queries sent 0, retried or failed 0
dnsmasq[1612]: server 208.67.222.222#53: queries sent 59, retried or failed 0
dnsmasq[1612]: server 127.0.2.1#5353: queries sent 4449, retried or failed 60
dnsmasq[1612]: time 1467180121
But I don't really know what means "retried or failed 60". So did it fail or
not? Is it because of the high TTL values or something else?