开发者

Is DNS query on client OS serilaized?

Even if you give out multiple parallel async DNS resolution requests (programmatically) on Linux or windows, do the OS serialize the requests and does not send them out all in parallel ?

As i read at places that gethostbyname or DnsResolve APIs are serialized in lowest layer, even someone has written this async-dns python library to dramaticcally speed up DNS resolutions

http://www.catonmat.net/blog/asynchronous-dns-resolution

So isnt there any .NET API or in general where it can work parallely as per the number of requests given by my program ?

Imagine a webcrawl scenario where i would need lot of dns querie开发者_C百科s per second, in some early web crawl publications , it is mentioned that dns becomes bottleneck.


Under Linux, gethostbyname() will effectivly be serialised, not least because it doesn't actually return to the caller until it has an answer. However it's just down to the library implementation, it's not the O/S that does this.

There are plenty of other libraries which can replace gethostbyname which do perform completely asynchronous resolution, allowing multiple queries to be in progress at once. A particularly good such library is libunbound, which is part of the Unbound recursive DNS server distribution.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜