public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4692] New: Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option
@ 2007-06-23 15:49 madalexonline at yahoo dot co dot uk
  2007-06-23 15:56 ` [Bug libc/4692] " madalexonline at yahoo dot co dot uk
  2009-02-20  0:17 ` madalexonline at yahoo dot co dot uk
  0 siblings, 2 replies; 3+ messages in thread
From: madalexonline at yahoo dot co dot uk @ 2007-06-23 15:49 UTC (permalink / raw)
  To: glibc-bugs

The ndots option may be set in /etc/resolv.conf to control when the resolver
tries looking up a name directly before considering the search list. This can be
used to tune the performance of lookups using knowledge of the local DNS setup
and the expected frequency of different types of lookup.

However there is no counterpart to allow the resolver to be told when it may
take initial "as-is" lookup failure as final and skip trying the search list.
Such an option would tune the performance of lookups of non-existent domains.

An example will probably aid comprehension and illustrate when and why this
might be useful:

Consider the domain example.com with nameserver ns.example.com, mail gateway
mx.example.com and an internal server int.example.com. Suppose that all other
hosts in the domain are at most sub-sub domains, that is all names in the domain
are of the form x.y.example.com. Assume that all machines have the domain and/or
search option in their /etc/resolv.conf set to example.com.

The internal server almost only ever looks up local domain names (within
example.com) and so has ndots set to 2 in its /etc/resolv.conf so that for any
query of the form x or x.y the resolver first looks for x.example.com and
x.y.example.com respectively. Since this is usually what is meant this speeds
lookups and keeps down the load which int.example.com places on the nameserver.

However the mail gateway is almost always looking up external domain names so
has ndots set to 1; the name x will probably be x.example.com (and this is still
tried first) but x.y is more likely to external (but still might be internal and
is still tried if the "as-is" query fails).

In the case of the mail gateway many failed lookups of the form x.y.z (or with
more dots) are expected (since example.com receives mountains of spam) and it
would be nice to skip the search list in these cases since it is known that
there are no names of the form x.y.z.example.com (but we still want to try
x.y.example.com for the query x.y) so that they fail faster and to reduce the
load on the nameserver.

I therefore propose a new option called, for the sake of argument, maxdots to
control the maximum number of dots in a name before the resolver considers it to
be absolute. In the example, mx.example.com would have maxdots set to 3 as this
is the maximum number of dots that may occur in a local domain.

I have produced a patch to implement this feature, and provide it here on the
off-chance that it should be considered useful by others. It ignores any item on
the search path such a that the new name to lookup would have more than maxdots
dots. So in the example above, when looking up x.y.z the search path item
example.com is ignored because x.y.z.example.com has four dots and maxdots is three.

The default setting for the new maxdots options is zero which means no limit,
i.e. the existing behaviour.

Alex

-- 
           Summary: Tuning failure to resolve non-existent domain names - a
                    counterpart to the /etc/resolv.conf ndots option
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: madalexonline at yahoo dot co dot uk
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=4692

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/4692] Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option
  2007-06-23 15:49 [Bug libc/4692] New: Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option madalexonline at yahoo dot co dot uk
@ 2007-06-23 15:56 ` madalexonline at yahoo dot co dot uk
  2009-02-20  0:17 ` madalexonline at yahoo dot co dot uk
  1 sibling, 0 replies; 3+ messages in thread
From: madalexonline at yahoo dot co dot uk @ 2007-06-23 15:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From madalexonline at yahoo dot co dot uk  2007-06-23 15:55 -------
Created an attachment (id=1900)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1900&action=view)
Patch to add a maxdots option in /etc/resolv.conf

This patch is against current CVS. It can be applied to 2.5 (and probably
earlier) with a only minor manual fix in resolv/resolv.h where the lack of the
new ipv6_unavail structure member causes the patch to fail to apply.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4692

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/4692] Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option
  2007-06-23 15:49 [Bug libc/4692] New: Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option madalexonline at yahoo dot co dot uk
  2007-06-23 15:56 ` [Bug libc/4692] " madalexonline at yahoo dot co dot uk
@ 2009-02-20  0:17 ` madalexonline at yahoo dot co dot uk
  1 sibling, 0 replies; 3+ messages in thread
From: madalexonline at yahoo dot co dot uk @ 2009-02-20  0:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From madalexonline at yahoo dot co dot uk  2009-02-20 00:16 -------
Created an attachment (id=3755)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3755&action=view)
Patch to add a maxdots option in /etc/resolv.conf

Updated patch for recent changes to the resolver code.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #1900 is|0                           |1
           obsolete|                            |


http://sourceware.org/bugzilla/show_bug.cgi?id=4692

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-20  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-23 15:49 [Bug libc/4692] New: Tuning failure to resolve non-existent domain names - a counterpart to the /etc/resolv.conf ndots option madalexonline at yahoo dot co dot uk
2007-06-23 15:56 ` [Bug libc/4692] " madalexonline at yahoo dot co dot uk
2009-02-20  0:17 ` madalexonline at yahoo dot co dot uk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).