To understand the DNS, I tried to write a simple resolver without a cache that could perform recursive queries, starting with root servers. There was a problem: if the server does not have the requested data, then it returns to us in the Authority-section NS-records with the names of those servers that are "closer to the answer", but it is not obliged to return the A-records in the Additional-section, respectively. NS records in Authority sections . He just may not know the addresses of these servers - is not required. They may not be in his zone. The exception is glue records.
Thus, it turns out: we have a name, the address of which we should receive. We are accessing one of the root servers (we take its address from the config). It returns to us the names of servers that are “closer to the answer” (probably, those whose zone includes the Top-Level-Domain). But he does not inform us of their addresses. They will let you know, but at the next iteration, one of these servers will tell us the name of the server "closer to the answer", but not its address. So we will already have 2 names in our hands, the addresses of which need to be obtained, and we will not receive the address of the first one without knowing the address of the second one. We will try to get the address of the 2nd, we get another name. Recursion, damn it! As if everything was simpler, if the NS records had an address, not a name. But no, in theory, by any name using the DNS system, we can get a match. address, but in practice it complicates the process.
Question: why in NS-records contains the name and not the address? Do DNS server addresses change so often that it’s difficult to update a zone file? The convenience here is a small plus compared with the complexity of the whole scheme. Why is this recursion (which I have described) generally finite?
PS: I know that having experimented, manually executing consecutive requests, m. I would understand what's the matter, but my hands do not reach. Maybe someone else will be useful my comment / comment on the DNS.