News for hackers. Stuff that matters.
Re:Web Developer's Guide to DNS by teddyh on Saturday April 13, 2019 @12:55PM (#19654182)
A few issues:

• The description is a bit vague, but the article seems to describe a model of a stack of resolvers, each resolver asking the next one in turn, the last resolver getting an answer, and the answer being then passed down the chain again. But this is not how it works. For a normal DNS query, there is ever only one resolver involved. This one resolver is the single thing asking many authoritative servers the same question, each time getting names of servers who might know the answer, and ultimately getting an actual answer. There is no stack of resolvers.

• The article completely conflates the process of a cached record expiring due to TTL expiration, with the process of an updated zone with a new serial number being transferred to slave servers. These two things have virtually nothing in common.

I also found the illustrations too detailed (i.e. confusing for non-experts). There are a lot of options to "dig" which could have been used to cut down on the extraneous output when illustrating a particular point.

The zone file was especially confusing, in that none of it was explained, and the nature of the DNS data model would have been much better illustrated with an object diagram of some kind.

Re:Web Developer's Guide to DNS by tyingq on Saturday April 13, 2019 @01:29PM (#19654434)
"the article seems to describe a model of a stack of resolvers, each resolver asking the next one in turn, the last resolver getting an answer, and the answer being then passed down the chain again. But this is not how it works."

There may be some semantics that aren't right, but say I have a Linux box, a home router, pointed at 8.8.8.8, and ask it for something not in anyone's cache. There is a "stack" of sorts when the answer isn't cached anywhere. Various caches in either resolver libraries and real DNS servers...forwarding ones, root ones, authoritative ones, etc.

And the depth of the stack is different depending on my setup.

Re:Web Developer's Guide to DNS by teddyh on Saturday April 13, 2019 @01:42PM (#19654515)
So where’s the stack?

The Linux box presumably uses the resolver as announced by the DHCP server on the router, which I would guess is 8.8.8.8. Therefore, the chain goes linux-box → 8.8.8.8 → auth servers, 8.8.8.8 being the resolver.

Or perhaps the router announces itself as the resolver, and proxies all requests to 8.8.8.8. This would not be necessary, but I guess it would be useful for the router to do proxying instead of NAT whenever the protocol (DNS in this case) makes it possible. There is still no reason to call the router a “resolver”, or even assume that the DNS proxy software on the router even has a cache.

Describing DNS as a stack of resolvers is like describing HTTP as always having a chain of caching proxies. It is not normally true, and even when it is close to true, it’s made to not look that way – i.e. it’s not useful to think of it that way, especially when explaining it to someone else.

Re:Web Developer's Guide to DNS by tyingq on Saturday April 13, 2019 @01:44PM (#19654527)
The Linux box could have a caching forwarder, as could the router. There are many routers with a local cache that put their own IP in the DCHP nameserver spot.

And 8.8.8.8 may not know the answer, and may have to query for it, that's a very common "stack". A non recursive client letting a recursive server do the trawling is probably the most common home use case.

You could put a recursive resolver on your Linux desktop, and that would be different. Not common for a home PC though.

Re:Web Developer's Guide to DNS by teddyh on Saturday April 13, 2019 @01:55PM (#19654588)
Everything is possible in theory, of course, but all of these theoretical possibilities are relatively uncommon, and, more importantly, made to not look like the aforementioned chain-of-resolvers. The normal DNS procedure is client→resolver→authoritative_server, and any deviation from this is deliberately hidden by the components which alter it.
Re:Web Developer's Guide to DNS by tyingq on Saturday April 13, 2019 @01:56PM (#19654592)
They aren't uncommon though. The most typical home setup has a non recursive client ask their ISP to resolve a name. The ISP, if it hasn't cached the answer prior, queries someone else on the client's behalf.

Separately, Windows, Linux (most popular distros), and MacOS all have a caching/forwarding local resolver.

Re:Web Developer's Guide to DNS by teddyh on Saturday April 13, 2019 @02:41PM (#19654907)
You’re still not describing a stack; you are describing the normal three-step client→resolver→auth_server procedure. Your “non recursive client” is the client, the ISP has the resolver, and that resolver performs many queries to many authoritative servers, which is the final step. There is still only one resolver, not a stack of them.

A common variation, which might have been what you meant to describe, is that a home router is announcing itself as a resolver to the local network, but is, in reality, merely acting as a proxy to the actual resolver, either at the ISP or some other resolver provider. But a DNS proxy is not a resolver, and might not even have a cache. A DNS proxy is made to be transparent, i.e. invisible to both sides; the local network sees the proxy as the resolver, and the real resolver sees the proxy as the client. There are even more complex setups possible on the authoritative server side, but none of these proxy possibilities alter the fundamental DNS model of client→resolver→auth_servers.

The possibility of transparent proxies in any client-server protocol should not alter the description of that protocol from “client-server” to “client-proxy-proxy-proxy-…-server”, especially not when the protocol does not itself account for proxies. The DNS protocol has, inherently, one component between client and server: the resolver. There is no chain-of-resolvers model in the DNS protocol. The possibility of any number of transparent proxies at any point in the chain should not alter the description or explanation of any protocol.

Re:Web Developer's Guide to DNS by xfitm3 on Saturday April 13, 2019 @02:11PM (#19654682)
Gross over simplification. You can have multiple authoritative resolvers, such as in the case of stub delegation.
Re:Web Developer's Guide to DNS by aspencer8111 on Saturday April 13, 2019 @10:44PM (#19657259)
Someone spends a shit ton of time explaining a new and complex concept.

Top comment is someone else ripping it apart. Yep. Welcome to Hacker News.

Can we please try to spend a week not using the following terms:

A few things, a few issues, actually..., I agree but, or anything else that makes you feel superior by shitting on someone else

Re:Web Developer's Guide to DNS by hnuser123456 on Saturday April 13, 2019 @11:59PM (#19657539)
No? If the article has issues, and you have domain-specific knowledge to correct it, please share to the benefit of all of us. Just because there are a few issues doesn't mean the whole thing was a waste, especially if it motivated an expert to share.
Re:Web Developer's Guide to DNS by yomly on Sunday April 14, 2019 @03:10AM (#19658008)
I don't see any tone in this reply which makes any personal attacks or even any major value judgements on the article itself such as "this is crap not even worth reading" as such I, the reader of both, am informed of an alternative explanation.

The author is then also invited to revise their article if they agree with the feedback.

Perhaps the grandparent could have thanked the author or opened with some positive feedback first, but given the grandparent took the effort to write detailed answers in a noncondescending tone, I see it as a quality informational post. I hope others do too.

Re:Web Developer's Guide to DNS by EpicEng on Sunday April 14, 2019 @12:50AM (#19657669)
Is the GP wrong? Of not then I don't see why you're bothered.
Re:Web Developer's Guide to DNS by Terretta on Sunday April 14, 2019 @02:56PM (#19661005)
A confused explanation gets halfway round the world before a valid explanation gets its pants on.
Re:Web Developer's Guide to DNS by kkarakk on Monday April 15, 2019 @07:19AM (#19664522)
i'd say it is constructive criticise more than "ripping someone apart". yes constructive criticism can make you feel bad, it doesn't mean it was intended to be hurtful. is this a class that just isn't taught nowadays