http://www.perlmonks.org?node_id=401517


in reply to Using Threading to speed up DNS Resolution

This is more work than you probably realize. Most name resolver libraries are single-threaded no matter what you do -- that is, regardless of whether you spawn off a zillion threads there'll only be one outstanding name lookup request for your process. If this is the case for you (and it may well be. Check before you do anything) then you'll need to find or write your own name resolution library. It's not horribly tough, but it does mean learning how to do DNS' wire protocol.

Running a local name server and talking to it rather than some remote server will probably speed things up quite a bit as well.