[dns-operations] good async DNS library

Hellqvist, Björn bjorn.hellqvist at teliacompany.com
Mon Apr 29 08:55:38 UTC 2019


We utilize pycares in Python for our monitoring solution. This is utilizing the c-ares async resolver library. 

But we only measure if it gets resolved and the return code, not looking too deep into the packets. It runs as a daemon and each query is threaded using Timer, so it will query each second, so it is non-blocking. So basically it will be able to send queries to the same server, even if the first one is not finished.

There are also asyncio DNS libraries for python. I think I started with that but moved to pycares instead. 

Bjorn Hellqvist
Senior System Expert (Internet, DNS & Automation)
Telia Company
Solna, Sweden

> -----Original Message-----
> From: dns-operations <dns-operations-bounces at dns-oarc.net> On Behalf
> Of John Levine
> Sent: den 27 april 2019 00:09
> To: dns-operations at dns-oarc.net
> Subject: Re: [dns-operations] good async DNS library
> In article <84CCFF1F-B98E-4E03-9767-2998AE82D072 at exonetric.com> you
> write:
> >It might simpler to just fork a process of your existing code for every
> resolver request though.
> If you're willing to use python, the regular dnspython library works fine with
> the built in python3 concurrent.futures thread library.
> I've done DNS queries in 100 threads in parallel on a not particularly fast
> server with no trouble.  I could probably run more but that was enough for
> my application.
> _______________________________________________
> dns-operations mailing list
> dns-operations at lists.dns-oarc.net
> https://lists.dns-oarc.net/mailman/listinfo/dns-operations
> dns-operations mailing list
> https://lists.dns-oarc.net/mailman/listinfo/dns-operations

More information about the dns-operations mailing list