Thanks a lot André and Mark,

I understand your advice on performance degradation due to reverse DNS. It
makes sense to me to disable the lookups at Tomcat level and search for the
hostname asynchronously when storing logs (we store audit in DB, then it
makes even more sense do this async). I will probably go for this solution.

This is another topic, but as far as I understand (from Java7 javadoc),
InetAddress is already implementing a cache. But it is not clear to me if
it is for hosname resolution (obtain the IP from hostname) or reverse DNS
(obtain hostname from IP). Perhaps it makes sense to have our own cache of
IP -> host mapping.

Anyway, as suggested by Mark, I will create an issue in BugZilla because I
think it can make sense in some context to do the reverse DNS lookup in
Tomcat natively when using a load balancer. However I am not sure if it
should be better to have a new Tomcat attribute for this (like
enableRemoteIpLookups) instead of using the attribute enableLookups,
because perhaps you do not want to lookups of the proxies IP but just the
remoteIp (x-forwarded-for).

Regards,

Yann Nicolas
El feb 21, 2014 3:16 AM, "Mark Thomas" <ma...@apache.org> escribió:

> On 21/02/2014 05:32, Yann Nicolas wrote:
>
> > Of course I can put a filter in my web application to do search the
> > hostname from the remote IP using "java.net.InetAddress" for example but
> I
> > was wondering if a Tomcat native solution exists.
>
> There isn't. Please create a Bugzilla issue for this.
>
> > If not, is there any particular reason for this, or is it because no body
> > has required that feature.
>
> More an omission in the handling of x-forwarded-for I suspect.
>
> While I don't have any objections to fixing this, I do strongly
> recommend reading André's response carefully. He makes a very good point.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to