Hacker News new | ask | show | jobs
by vetinari 643 days ago
> the fact remains that the expectation of querying DNS servers in a specific order has been a common understanding for many.

That understanding has been wrong; it is an implementation detail of glibc and that's it. It could query them in random order, or round-robin them for each request; or time them how fast they respond and prefer the fastest, up until it starts timing out and then shake the order again. Some resolver stubs ask all of them and use the answer that arrives first. That's also valid. Since they all are returning the same answer, it doesn't matter. It also makes any argument for ordering superfluous.

So that "common understanding for many" is erroneous and those many should update it. The thread you linked to has exactly a discussion on this point, so in the years that passed since then, those affected many had ample time to fix up their assumptions.

1 comments

That understanding is in line with using libresolv and the established behavior of the resolv.conf file, which accompanies the libresolv library. While it’s true that different implementations (e.g., some resolver stubs) might use various methods like round-robin, timing, or querying all servers simultaneously, this doesn’t invalidate the behavior outlined in resolv.conf.

Again, there can be other valid reasons for maintaining an order. Could be about latency, privacy etc.

I admit to not having read the full thread, and I apologize for any needless rehashing of arguments. It was just the first result confirming systemd-resolved breaking setups by its handling of what many (in that thread) consider expected behavior.

What I think you're primarily suggesting is that there are no formal standards prescribing glibc's behavior in terms of DNS resolution order. That is certainly true, and I don't disagree calling it an implementation detail.