You're viewing a comment by Peteris Krumins and its responses.
You're viewing a comment by Peteris Krumins and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


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