[ntp:hackers] Asynch resolver

Danny Mayer mayer at ntp.isc.org
Tue May 9 01:48:18 UTC 2006


Brian Utterback wrote:
> Danny Mayer wrote:
> 
>>  Don't forget that ntpd is itself asynchronous, it doesn't
>> wait for responses to it's packets, it just moves on to the next item.
>> When it gets something back it processes it when it gets to it.
>>
>> Danny
> 
> Sure, which is exactly why it currently has to do name resolution
> in another process, since name resolution blocks and ntpd cannot
> afford to block.
> 

If you are just using getaddrinfo() and friends, then yes. But you don't
have to do it that way. BIND does not even when it acts as the resolver.

> Again, arbitrary name resolution blocks. There is no way around that.
> The only way to deal with that is to either do the name resolution in
> another thread or another process. Doing it in another thread opens
> yourself up to threading issues.
> 

See above. There's more than one way to do this.

Danny


More information about the hackers mailing list