You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Sangjin Lee (JIRA)" <ji...@apache.org> on 2009/06/23 22:09:07 UTC

[jira] Created: (ASYNCWEB-30) using an IP address as the host may trigger reverse DNS lookups

using an IP address as the host may trigger reverse DNS lookups
---------------------------------------------------------------

                 Key: ASYNCWEB-30
                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-30
             Project: Asyncweb
          Issue Type: Bug
          Components: Client
    Affects Versions: client-1.0.0
            Reporter: Sangjin Lee
            Assignee: Sangjin Lee


If you send a request using a numeric IP address (e.g. "10.11.12.13") as the "hostname" and keep-alive is enabled, a reverse DNS lookup is triggered every time the session is returned back to the cache or removed from the cache due to problems.

It stems from the fact that a string representation of the address ("host:port") is used as a key for the session cache.  When we have an InetSocketAddress, and try to compute this string key, it calls InetSocketAddress.getHostName() which triggers a reverse DNS lookup for IP address based address objects.

This has a pretty adverse effect of having a flood of DNS lookups if IP addresses are used as hostnames.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ASYNCWEB-30) using an IP address as the host may trigger reverse DNS lookups

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ASYNCWEB-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee closed ASYNCWEB-30.
-------------------------------

    Resolution: Fixed

Switched to using the InetSocketAddress objects directly as the session cache lookup key.  Its equals() and hashCode() methods provide proper lookups, and does not trigger unnecessary DNS lookups.

> using an IP address as the host may trigger reverse DNS lookups
> ---------------------------------------------------------------
>
>                 Key: ASYNCWEB-30
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-30
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: client-1.0.0
>            Reporter: Sangjin Lee
>            Assignee: Sangjin Lee
>
> If you send a request using a numeric IP address (e.g. "10.11.12.13") as the "hostname" and keep-alive is enabled, a reverse DNS lookup is triggered every time the session is returned back to the cache or removed from the cache due to problems.
> It stems from the fact that a string representation of the address ("host:port") is used as a key for the session cache.  When we have an InetSocketAddress, and try to compute this string key, it calls InetSocketAddress.getHostName() which triggers a reverse DNS lookup for IP address based address objects.
> This has a pretty adverse effect of having a flood of DNS lookups if IP addresses are used as hostnames.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.