httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] HostnameLookups
Date Wed, 11 Feb 2004 17:37:31 GMT

On Wed, 11 Feb 2004, j.travis wrote:

> I have read that it is a performance liability to have HostnameLookups
> turned on.  What I am wondering is will Apache2 do a
> HostnameLookup -before- it responds to a request? (in which case that
> could indeed be a very big liability) or does it do it independently of
> requests (but just sometime before it gets logged). If this is the case
> it seems like it would be only a slight overall use of bandwidth and a
> very miniscule performance hit.  It certainly makes the log files more
> interesting to browse through...

It must be done before the response in order to fill variables like
REMOTE_HOST that some script rely on.  It must also be done before the
response if any access controls are host-based.

Even if it was done after the response, it would still be a bad idea for a
busy server because it would extend the time that each request ties up a
process, and would also slow keepalive/persistent connections.

Your best bet is to post-process the logs using something like logresolve
(included with apache).  If you reall want the names in near-real-time,
you can pipe your log files through something like logresolve before they
are written to disk.  This gives you the effect of after-response


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message