The Sun Java document is at:

http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html

which says you can change networkaddress.cache.ttl in java.security or
sun.net.inetaddr.ttl on the command-line.

These need to be defined at startup - or at least before DNS is first used.

So you cannot change the TTL without restarting, but you can set it to
a low enough value (try 0) such that DNS queries are not cached for
too long.

The default TTL is -1, for the reasons stated in the bug report.
This means the cached value will be kept for the life of the JVM.

I think non-Java applications also cache DNS results; I'm not sure if
this is done in the language library or the OS itself.

Nor do I know if Java is subject to caching of DNS entries by the OS.

If you want to sure of using the correct DNS entries, you could
perhaps try using CSV Dataset with a file of IP addresses. However
this probably won't work for virtual hosts, as they normally require
the host name (and I'm not sure you can override this via the header
manager).

On 25/10/2007, Sonam Chauhan <[EMAIL PROTECTED]> wrote:
> Hi -
>
>
>
> I've got to load test a clustered application server.
>
>
>
> External users of the application (whom JMeter must simulate) access it
> through a hardware load balancer.
>
>
>
> However, internal access goes through DNS Round Robin load balancing
> (implemented in Active Directory). This means that each DNS request to
> resolve a hostname will resolve to a different primary IP address.
>
>
>
> I understand that the JVM caches DNS lookups forever by default. This
> article implies that a JMeter load test accessing a cluster through the
> DNS Round Robin above, will only load test 1 node in the cluster as it
> caches the first name resolution it does:
>
> http://www.rgagnon.com/javadetails/java-0445.html
>
> Once an application has performed network access (i.e. urlconnection,
> parsing of xml document with external references, etc), the DNS settings
> get cached so any subsequent operation will use the old settings even if
> the real settings have changed. To reset everything, you have to restart
> the server since the default setting JVM setting is to cache forever.
>
>
> Is this true? How does this impact JMeter testing? I found this related
> bug on the Sun website.
>
>
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6376406
>
>
>
>
>
> Kind regards,
>
> Sonam Chauhan
>
> --
>
> Corporate Express Australia Ltd.
>
> Phone: +61-2-93350725, Email: [EMAIL PROTECTED]
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to