httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: IPv6 capability and name lookup cost
Date Fri, 06 Sep 2002 14:10:49 GMT
Jeff Trawick <trawick@attglobal.net> writes:

> 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

Getting more specific, I envision a directive that works like this:

NameLookups All|IPv4Okay|IPv6Okay

All:      current behavior -- tell resolver to find everything

IPv4Okay: try IPv4 first, don't look for IPv6 unless no IPv4 addresses found
          note: if the host is specified in the form of an IPv6
          numeric address string, APR will do the right thing
IPv6Okay: try IPv6 first, don't look for IPv4 unless no IPv6 addresses found
          note: if the host is specified in the form of an IPv4
          numeric address string, APR will do the right thing

(potentially we could add something like this in the future, though I
don't think that is necessary now since it is an optimization for an
error path:
  IPv4Only: only look for IPv4 addresses
  IPv6Only: only look for IPv6 addresses
)

I guess core should export the information via a function like

  ap_get_name_lookup_opts(apr_int32_t *opts)

which will set a variable to be OR-ed with any other appropriate
apr_sockaddr_info_get() flags to achieve the proper behavior.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message