开发者

Twisted dns client

开发者 https://www.devze.com 2022-12-31 22:26 出处:网络
I\"m using twisted framework to do some async reverse DNS resolving. I want to be able to test it against number of nameservers.

I"m using twisted framework to do some async reverse DNS resolving. I want to be able to test it against number of nameservers.

As i thought from reading the API docs when i create a Resolver object like this:

nameservers = [('4.2.2.2', 53), ('4.2.2.3', 53)]

r = client.createResolver(s开发者_如何学运维ervers=nameservers)

It will query both nameservers, when in fact only one is used. What are my options except using a loop?


You need to use a loop, with separate resolvers.

In DNS multiple servers are there for redundancy, and queries are only sent to multiple servers if previously tried servers fail to answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消