Live data from Hacker News

Why is DNS still hard to learn?

jvns.ca

11–20 of 261 posts

Re: Why is DNS still hard to learn?

#11
One of the gotchas I encountered is that DNS is asynchronous, with possibly a long delay before reply. C apis make it look synchronous - which I think makes it harder to work with. There's also the detail that order of replies can be any. (I found too many developers expected synchronous and instant replies)

Re: Why is DNS still hard to learn?

#12
post #2

It’s not. It’s one of the few things that hasn’t changed much and it’s operation is fairly straightforward. dig is a little confusing. It’s more capable but less straightforward than good old nslookup (which still works fine BTW). I think partly DNS and the core protocols may seem confusing to younger people in the industry because so much stuff “just works” now. For example, today wifi routers “just work” right out…

A network engineer or a teenager motivated to communicate with his girlfriend when not at his dads office.

Re: Why is DNS still hard to learn?

#13
post #5

the joke i've always heard is DNS combines 2 of the hardest problems in CS: naming things and cache invalidation

It comes with a validity counter in seconds, and you can be very very loose about counting those seconds.

It's not the hard kind of cache invalidation. You don't really have to do "invalidation" at all.

And on the server side, it's perfectly acceptable to send a mix of old and new versions for a while.

Re: Why is DNS still hard to learn?

#14
I feel like DNS is one of the more straightforward protocols, especially on a practical level, and especially given that most interfaces are a dropdown and two text boxes.

I have noticed a lot of developers shy away from it, probably because they don't use it much or it's not their job (rather than it being hard).

Re: Why is DNS still hard to learn?

#15
I remember being stymied by the BIND zone files (which are plain text) being called .db files (they may actually be called anything -- some people used the .db extension). I had just learned about sendmail, and I knew it kept alias tables in Berkeley DB files (which are binary), which in sendmail parlance were also called .db files.

As Alan Kay is fond of quoting Bob Barton... "Systems programmers are high priests of a low art."

Re: Why is DNS still hard to learn?

#17
post #2

It’s not. It’s one of the few things that hasn’t changed much and it’s operation is fairly straightforward. dig is a little confusing. It’s more capable but less straightforward than good old nslookup (which still works fine BTW). I think partly DNS and the core protocols may seem confusing to younger people in the industry because so much stuff “just works” now. For example, today wifi routers “just work” right out…

These things you're talking about are a small fraction of DNS though.

For instance, you lookup "thing.behind.cdn.it" and get one answer, someone else looks up the same thing and gets a different answer. Pretty obvious, but when someone asks the reasonable question "can you open a firewall hole for thing.behind.cdn.it"

Some servers forward requests, some delegate, some will look stuff up for you others won't. And there's the magic with search domains on clients, and if clients or internal resolver libraries will honor TTLs or not.

There's also the myriad different types of records, and sometimes the server will tell you to reconnect in TCP instead of UDP, etc.

So -- DNS is pretty complex; it has the illusion of being simple because it works so well and most of the fiddly bits are abstracted away by stuff that mostly just works.

Re: Why is DNS still hard to learn?

#18

I feel like DNS is one of the more straightforward protocols, especially on a practical level, and especially given that most interfaces are a dropdown and two text boxes. I have noticed a lot of developers shy away from it, probably because they don't use it much or it's not their job (rather than it being hard).

"Dropdown and two text boxes" undersells it.

Here is the list of several dozen record types: https://www.iana.org/assignments/dns-parameters/dns-paramete...

Re: Why is DNS still hard to learn?

#19
post #5

the joke i've always heard is DNS combines 2 of the hardest problems in CS: naming things and cache invalidation

It comes with a validity counter in seconds, and you can be very very loose about counting those seconds. It's not the hard kind of cache invalidation. You don't really have to do "invalidation" at all. And on the server side, it's perfectly acceptable to send a mix of old and new versions for a while.

That definitely helps things to work, but it makes it very much more difficult to work out why things might not be working.

Not least because an unexpected cache can lead to things looking like they're working when they're actually broken at source, as well as things looking like they're still broken when you've actually fixed them at source already.

Re: Why is DNS still hard to learn?

#20
post #2

It’s not. It’s one of the few things that hasn’t changed much and it’s operation is fairly straightforward. dig is a little confusing. It’s more capable but less straightforward than good old nslookup (which still works fine BTW). I think partly DNS and the core protocols may seem confusing to younger people in the industry because so much stuff “just works” now. For example, today wifi routers “just work” right out…

Pretty much what I came here to say. As a young system administrator, DNS was the second thing I learned after setting up my first Apache server and I didn't find it hard to learn at all.

I will admit that it when you get to a certain point, you have to be careful not to shoot yourself in the foot when operating a production system but that is a slightly different concern which is more implementation dependent. Eg BIND.

Post reply on HN