Persistent DNS Caching Not Utilized By Python's Socket.getaddrinfo/mercurial
I used to have very slow DNS lookups on my Ubuntu machine when connecting through one Modem/ISP. I followed instructions (such as those here) to use persistent DNS caching so I don
Solution 1:
Thanks to this post on the python list, it seems if you use BIND, then python's getaddrinfo uses cached DNS lookups. After installing BIND and starting it, then repeated DNS lookups are instantaneous.
Solution 2:
Pythons socket.getaddrinfo() uses the OS’s getaddrinfo() (over libc). – This has nothing to do with Python at all. If pdns is already configured to be in the resolution-chain, then different resolution-speeds are rooted by different requests. – Look more closely at which exact getaddrinfo() requests are fast, which are slow.
Post a Comment for "Persistent DNS Caching Not Utilized By Python's Socket.getaddrinfo/mercurial"