Hacker News new | ask | show | jobs
by bemmu 3090 days ago
I recently wrote a simple nonrecursive one in Python to see how many domains I could resolve per second. You quickly hit a limit when you try to use something like Google's 8.8.8.8 server too fast. If you do it recursively starting from root servers, can you go as fast as your bandwidth allows?
1 comments

I don't think you can give a recursive query to a root server.
Sorry, what I meant with "recursive" was doing the recursion myself, instead of handing it off to a server like Google's DNS server. If I follow the replies starting from root server one by one, am I likely to hit some limit?
It seems unlikely that you were able to overload the Google public dns server, and it also seems unlikely that you were saturating your connection. Thus you probably hit a rate limit. If you go recursive, and cache at least the TLD servers, distributing requests evenly across the 13 logical servers that typically manage a TLD such as .com, you’ll probably see a much higher per second throughput than through the google server, but still constrained by rate limits.
You shouldn't, but as there are multiple root servers you should round robin them instead of hitting the same one every time.