gethostby* users

Simo Sorce ssorce at redhat.com
Sun Oct 14 20:16:47 UTC 2007


On Sun, 2007-10-14 at 09:56 -0700, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Simo Sorce wrote:
> > Now if you reorder these addresses what happen is that the main site A
> > clients will always try to contact the branch office servers instead, as
> > they have 'site-local' ones.
> 
> Why would we reorder?  This is not a given.  First, if the local network
> addresses have a longer matching prefix it is automatically preferred.
> Second, even if somebody is in the situation where somebody bad a bad
> decision that this is not the case (e.g., always remember a machine can
> have more than one IP address) you can overwrite the default preferences
> getaddrinfo uses for sorting using /etc/gai.conf.

I wish you have read in full my email, but from your comment I see you
didn't :-(

I explained a very common situation and also explained you why gai.conf
is not a solution when you need different rules for different servers in
the same networks.

This was just an example that didn't involve Round Robin, as it is clear
that reordering just breaks any load balancer that uses DNS in a Round
Robin fashion ... and that should be enough to warrant _at least_ a way
to easily disable completely reordering for IPv4 addresses.

If you want getaddrinfo() to be adopted you need to help people use it,
forcibly reordering IPv4 addresses means a lot of clients simply can't
use it.

Simo.




More information about the fedora-devel-list mailing list