jack
jack

Reputation: 1435

Fastest DNS library for python

What library is the fastest to make hundreds of DNS queries in multi-tasking.

I've googled round DNS libraries for python. I found that adns is said to be fastest. But it's not Windows-compatible. Are there any cross-platform compatible DNS libraries for python?

Upvotes: 1

Views: 847

Answers (1)

Rakis
Rakis

Reputation: 7864

Twisted's DNS library is cross platform. Whether or not it's the "fastest" is debateable but Twisted performs very well on the whole. I'd be surprised if it couldn't saturate your I/O link.

One point of note though: Twisted uses asynchronous I/O rather than multi-tasking to achieve concurrency. Async I/O is a very good mechanism for handling concurrent queries but it requires a different programming style from the typcial threaded approach. The learning curve can be steep but it's fairly short and, in my opinion, it's well worth the effort.

Upvotes: 7

Related Questions