[dns-operations] good async DNS library

Doug Barton dougb at dougbarton.email
Fri Apr 26 18:09:09 UTC 2019

On 4/26/19 4:44 AM, Mark Blackman wrote>
> It might simpler to just fork a process of your existing code for every 
> resolver request though.

Yeah, I was thinking that as well. Perl makes that pretty easy, and 
depending on the needs of the monitoring solution there are a couple of 
fairly painless ways you could do the IPC.

That said, it's not clear to me that the requirements are reasonable. 
Wanting to report success for every fast response once a second is 
reasonable, but DNS, especially over UDP, was not designed for that kind 
of high performance.

If I were designing a monitoring solution from the ground up, I would 
probably do something like have the process store state for that 
monitor, and then report it at regular intervals. Query sent, waiting 1 
second, waiting 2 seconds, query received, and then maybe time out on 
the third second. "Getting answers but they are coming slow" is a 
different failure mode than "Not getting answers at all," and tracking 
the former over time provides useful metrics for a variety of things, 
including capacity planning.

However, given the OP's response that they don't have time to write 
their own code to do what they want to do, I would think an 
off-the-shelf solution like Nagios, or whatever the new hotness is 
nowadays, would probably be a better solution. Writing monitoring code 
is more difficult than most people think it is, and there is a 
non-trivial level of maintenance involved as well.

hope this helps,


More information about the dns-operations mailing list