Shoaibi
Shoaibi

Reputation: 889

Multithread DNS Query against specific DNS, domain and recordtype supporting Library

Resolved, used adns with python bindings...

I have a scenario in which i have to do the following:

I have tried this but its not multi threaded and even a single query takes about 3 seconds. I looked at ADNS, its python binding and http://www.catonmat.net/blog/asynchronous-dns-resolution , its much much faster than any other way but i still haven't found a way with ADNS Python bindings to query a specific DNS server instead of the ones used in resolv.conf.

What do you think? Is there a solution? Or should i launched each ADNS query in a chrooted environment with resolv.conf created the fly?

Oh and i would prefer it to be PHP/Python to easily include it in an appiication.

Upvotes: 0

Views: 1066

Answers (1)

Fanis Hatzidakis
Fanis Hatzidakis

Reputation: 5340

If you do go with PHP for the client side and feed it with domains to query, you should consider stream_select for working with many streams (each one a dns query) in a non-blocking way. Wez Furlong explains it well.

Upvotes: 1

Related Questions