[Dnsmasq-discuss] Caching with custom upstream domain

Paulo Bittencourt paulo at wattpad.com
Wed Jul 12 15:20:35 BST 2017


Hello!

We are using dnsmasq for local DNS caching on all our hosts.

We've set up a custom upstream domain to route DNS requests for Consul to
the local Consul agent, using this config directive:

server=/consul/127.0.0.1#8600

Looking at the load the Consul agent, we were suspecting that dnsmasq was
not caching the replies from Consul.  After enabling query logging on
dnsmasq, it looks like this is the case.

If I query any other domain repeatedly, (eg. example.com, google.com), it
logs that it's using the cache:

Jul 12 13:56:56 ip-10-184-50-103 dnsmasq[18119]: query[A] www.google.ca
from 127.0.0.1
Jul 12 13:56:56 ip-10-184-50-103 dnsmasq[18119]: cached www.google.ca is
172.217.5.227
... repeats ...

If I query a Consul domain repeatedly, it doesn't seem to use the cache:

Jul 12 13:57:55 ip-10-184-50-103 dnsmasq[18119]: query[A]
consul.service.consul from 127.0.0.1
Jul 12 13:57:55 ip-10-184-50-103 dnsmasq[18119]: forwarded
consul.service.consul to 127.0.0.1
Jul 12 13:57:55 ip-10-184-50-103 dnsmasq[18119]: reply
consul.service.consul is 10.144.40.2
Jul 12 13:57:55 ip-10-184-50-103 dnsmasq[18119]: reply
consul.service.consul is 10.51.148.85
Jul 12 13:57:55 ip-10-184-50-103 dnsmasq[18119]: reply
consul.service.consul is 10.37.226.205
... repeats ...

I've searched for any documentation regarding caching behavior for custom
upstream domains and I haven't found anything.

Any ideas?

Thanks,
Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20170712/31217f35/attachment.html>


More information about the Dnsmasq-discuss mailing list