Jeff Trawick wrote: > (this discussion assumes Apache has IPv6 capability) > > There are some situations during normal web server operation where > resolver calls are made to find addresses associated with names and we > have no clue whether or not the name has an IPv6 address associated with > it. Forward proxy is a good example of this. apr_sockaddr_info_get() > will return all addresses associated with the name, and some existing > resolvers first do IPv4 name lookup followed by IPv6 name lookup in > order to implement this. The lack of overlap results in higher elapsed > time; the inability to bundle the queries in a single flow results in > higher kernel/library CPU. A resolver cache can help with this. > > In most cases, there is no IPv6 address. In some cases where there is > an IPv6 address, using the IPv4 address would be sufficient. > > A useful performance improvement can be achieved by allowing the > administrator to select the following algorithm: > > lookup IPv4 > if at least one IPv4 address was found, we're done > lookup IPv6 > I know this sounds stupid, but it is usefull to have a option to do it the other way. lookup ipv6 if it's there then use it (we're done) lookup ipv4
--Ian > The benefit is clear. The drawback is that if IPv4 addresses were found > but those addresses are not usable (e.g., IPv4 addresses disabled on > that machine but admin didn't remove from DNS), we wouldn't then be able > to try the IPv6 addresses (without much more work). (But the admin > chose the behavior so what do I care :) ) > > The bulk of the implementation would be in APR (new flag to > apr_sockaddr_info_get()), but Apache would have a configuration > mechanism to allow the administrator to turn on the flag. Up for > discussion would be if there is an Apache-wide preference or whether > different components/modules (core, mod_proxy_foo, etc.) should have > separate > knobs. Personally I'd prefer an Apache-wide preference which would be > respected by core and by any modules > distributed by us. Any 3rd-party modules could/should respect the > configuration too. > > Comments? > > (If APR has no IPv6 capability, the new processing flag would be ignored > since we're only going to do the IPv4 > lookup anyway.) >