<div dir="auto">Geert,<div dir="auto"><br></div><div dir="auto">What is the meaning of this?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 17, 2020, 1:48 AM Geert Stappers <<a href="mailto:stappers@stappers.nl">stappers@stappers.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Mar 16, 2020 at 08:31:17PM -0500, Sasha Litvak wrote:<br>
> I couldn't find a specific answer anywhere so hopefully someone has a<br>
> clue on this list<br>
> <br>
> We are using dnsmasq on our servers as a caching dns solution.<br>
> <br>
> Most of our domains are resolved by a wildcard record like this<br>
> <br>
> $TTL 3600       ; 1 hour<br>
>                         A       10.10.10.23<br>
> $ORIGIN <a href="http://example.net" rel="noreferrer noreferrer" target="_blank">example.net</a>.<br>
> *                       CNAME   excontainers<br>
> excontainers    CNAME   exservice.service.consul<br>
> <br>
> dnsmasq handles resolution of .consul domain directly but the DNS<br>
> server itself also forwards .consul to consul servers.<br>
> <br>
> I added min-ttl 5s to decrease the number of queries to consul<br>
> <br>
> So when I do dig <a href="http://foo.example.net" rel="noreferrer noreferrer" target="_blank">foo.example.net</a>  @<a href="http://127.0.0.1" rel="noreferrer noreferrer" target="_blank">127.0.0.1</a> I get<br>
> <br>
> <a href="http://foo.example.net" rel="noreferrer noreferrer" target="_blank">foo.example.net</a>. 3600 IN CNAME <a href="http://excontainers.example.net" rel="noreferrer noreferrer" target="_blank">excontainers.example.net</a>.<br>
> <a href="http://excontainers.example.net" rel="noreferrer noreferrer" target="_blank">excontainers.example.net</a>. 3600 IN CNAME exservice.service.consul.<br>
> exservice.service.consul. 5 IN A 10.0.48.13<br>
> <br>
> Now we often need to migrate subdomains by pointing them to a<br>
> different consul cluster.  So our script uses nsupdate and creates a<br>
> dynamic DNS record resulting in this reply<br>
> <br>
> <a href="http://foo.example.net" rel="noreferrer noreferrer" target="_blank">foo.example.net</a>. 60 IN CNAME  exservice2.service.consul.<br>
>  exservice2.service.consul. 5 IN A 10.0.48.35<br>
> <br>
> So we have a record that is more explicit and it takes precedence over<br>
> wild card.   On servers with little traffic, domain switch happens<br>
> within a few seconds, but on the main busy server with 100s of queries<br>
> a second, it takes an hour for dnsmasq to change its cache.  We see<br>
> dnsmasq sending requests to the DNS server getting correct new records<br>
> but still sending the old cached records to a client.<br>
> <br>
> When we are going back from distinct to default wild card (removing<br>
> distinct record in DNS) cache change happens almost immediately (a<br>
> couple of seconds) regardless of how busy the server is.<br>
> <br>
> Sorry for the long description but I would like to find out a reason<br>
> why during switching from wild card to more explicit record dnsmasq<br>
> cache update takes such a long time.<br>
<br>
$ host -t ns org<br>
org name server <a href="http://d0.org.afilias-nst.org" rel="noreferrer noreferrer" target="_blank">d0.org.afilias-nst.org</a>.<br>
org name server <a href="http://b2.org.afilias-nst.org" rel="noreferrer noreferrer" target="_blank">b2.org.afilias-nst.org</a>.<br>
org name server <a href="http://a0.org.afilias-nst.info" rel="noreferrer noreferrer" target="_blank">a0.org.afilias-nst.info</a>.<br>
org name server <a href="http://a2.org.afilias-nst.info" rel="noreferrer noreferrer" target="_blank">a2.org.afilias-nst.info</a>.<br>
org name server <a href="http://b0.org.afilias-nst.org" rel="noreferrer noreferrer" target="_blank">b0.org.afilias-nst.org</a>.<br>
org name server <a href="http://c0.org.afilias-nst.info" rel="noreferrer noreferrer" target="_blank">c0.org.afilias-nst.info</a>.<br>
$ host -t ns consul<br>
Host consul not found: 3(NXDOMAIN)<br>
$ <br>
<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank" rel="noreferrer">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>