gethostby* users

Adam Tkac atkac at redhat.com
Sun Oct 14 08:46:47 UTC 2007


On Sat, Oct 13, 2007 at 09:14:33AM -0700, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Simo Sorce wrote:
> > Ulrich, some people claim that glibc's getaddrinfo breaks IPv4 DNS round
> > robin as it reorders also IPv4 address, can you comment on this? In some
> > cases it is important.
> 
> It is not necessary (and quite wrong) to implement RR in the server.
> It's an approximation at best anyway.  In no way better than
> randomization.  And nothing stops programs from randomizing the results
> returned by getaddrinfo before using them.  Normal programs won't do
> that but there is nothing which stops programs like ntpd from doing this.
>

I'm not sure why it is wrong. When you get response from server many applications simply take first record and use them. It could cause overload of one server and other will do nothing. Also I'm not sure about get{addr,name}info() implemetation in other systems (BSD, Sun, and maybe Windows) if they implementing RR or some other mechanism. Generally RR implemented in server is good way how all DNS records will be used balanced.

Adam




More information about the fedora-devel-list mailing list