3 ms·
I've thought about writing my own recursive DNS resolver that followed that exact pattern (with caching according to TTL's off course). So yes, you may only ne
by X-Istence 15y ago
I've thought about writing my own recursive DNS resolver that followed that exact pattern (with caching according to TTL's off course).
So yes, you may only need to hit the root once to get the tld as it will be cached, but it is still a hit. I am not sure that downloading the root.zone.gz instead is necessarily required, especially with the amount of new tld's that they are planning on adding it would amount to a lot of wasted resources.
Also, for some domains (those in the UK are the ones that popped into my mind), you have sub-domains such as co.uk.
So that is another extra lookup... and depending on whether or not you want to use ANY or not in the lookup you find that if you query ns1.nic.uk for co.uk. (A) you get an SOA record back, but no NS results, so at that point instead of just being able to continue you'd have to retry with co.uk. (ANY). At that point you get back a truncated result, and need to retry over TCP...
Now you can continue on to ns1.nic.uk for co.uk. and ask it your question mydomain.co.uk. so and and so forth.
You've piqued my interest and I am thinking I may start keeping logs from my local recursive DNS resolver and start looking at what the cost is now versus what the cost would be if recursive DNS resolvers would go step by step themselves (keeping in mind TTL's and the like).