You're viewing a comment by Peteris Krumins and its responses.

September 20, 2009, 08:26

Hi argv. Thanks for your excellent comments again. I absolutely love them. Keep them coming!

You are absolutely right that your code would beat all the high level language modules. In this article though, I am using a Python interface to the C module. I guess this code would also be slower than yours because it's more generic and is written to handle most of DNS protocol. As I understood your code handles only resolution of A records. There is less code to execute and it would beat other implementations.

If I developed a high speed DNS resolver on my own, I'd make it use tens of DNS servers to minimize load on single server and maximize throughput.

And if I was totally into it, I'd find the optimal number of queries per second to send to each server. The code would start at something like 100 queries per second, and change that rate, and see how the responses vary. If increasing queries per sec also increases responses per sec, I'd increase queries some more. But if I'd get less responses per second, I'd decrease them. This way I'd find the optimal load for each of the servers.

It seems my ISPs DNS server was able to handle my 20000 requests per minute.

Btw, any suggestions on what I could write about DNS next?

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type first 3 letters of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.