resolv.conf question

Barry Margolin barmar at genuity.net
Wed Jun 14 17:53:38 UTC 2000


In article <20000614150609.G14864 at stahlw06.stahl.bau.tu-bs.de>,
 <r.hildebrandt at tu-bs.de> wrote:
>I know that the servers given in /etc/resolv.conf are queried in the order
>they're listed there. If the first server fails, we get a timeout and the
>second server is tried and so on.
> 
>My question: Is there any way to automatically reorder the server in such a
>way, that query time is optimal?
> 
>Reason: We had several customers complaining about bad performance, and one
>of the main resons was that the nameservers in their /etc/resolv.conf's were
>not answering their machine's queries.
> 
>So if a nameserver repeatedly fails to answer requests, it should be pushed
>back (downwards) in the list of servers.

You could write a cron job that checks all the servers and rewrites the
resolv.conf file to match the current state.

Note, however, that the resolver library only reads /etc/resolv.conf file
the first time it's used.  A long-running process (e.g. daemons like
sendmail or user applications that are rarely restarted like netscape) will
continue to use the nameserver order that was in the file when it started
up.

-- 
Barry Margolin, barmar at genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



More information about the bind-users mailing list