jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noam Paz <noam....@db.com>
Subject Re: DNS caching?
Date Mon, 16 Jan 2006 13:53:19 GMT

Robin,
you could try the following:

First verify that my idea works, because various load balancers work differently:
- Record a session using the load balancer
- Look at the response comming from the load balancer. Do you see in it where the redirection
goes to? If so, my idea is aplicable to you. Here is an example how it looked in one of my
tests:
=============================================================================================

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="https://prodserver2.de.com/proj/startseite.htm">here</A>.<P>
<HR>
<I>HTTP Redirector/1.2</I>
</BODY></HTML>

=============================================================================================


If the load balancer works that manner than:
- Edit your .jmx file with a text editor and put in each http request but the first one the
value ${server} for servername or IP, ${port} for port number and ${protocol} in the protocol
field.
- For the first request, the one to the load balancer, put the server, port and protocoll
in as needed.
- In the first request make "Follow Redirects" checked.
- Put 3 regular expression extractors below (inside) the request to the load balancer:
      Protocoll:
      \<A HREF=\"(.*?):\/\/

      Host:
      \<A HREF=\".*?:\/\/(.*?)/

      Port:
      \<A HREF=\".*?:\/\/.*?:([0-9]*?\">
- inside the very next request put a User Parameters control and set the variables server,
port, protocol to the values you have just extracted.

You might need to add the "browser derived header" control to the first request.

Good luck!


Best regards / Viele Grüße

Noam Paz




                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

             sebb <sebbaz@gmail.com>                                               
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
      
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

             16.01.2006 12:08                                                            
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                       To

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                               JMeter Users List <jmeter-user@jakarta.apache.org>
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                  
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                       cc

                                                                                         
                                                                                         
                 Please respond to                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         "JMeter
Users List" <jmeter-user@jakarta.apache.org>                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                 Subject 
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                               Re: DNS caching?                          
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         





I think this is beyond the control of JMeter; DNS lookups are handled
by the Java run-time.

There may be some system properties that you can set to control this -
check the JVM documentation.

And if you do find anything, please let us know - or add it to the Wiki...

On 14/01/06, Robin Bowes <robin-lists@robinbowes.com> wrote:
> Hi,
>
> I'm using JMeter to load test a web app. which is behind a load balancer
> and squid proxies.
>
> The architecture is something like:
>
> LB1--+--squid 1--+--web server (www.example.com)
>     |           |
>     +--squid 2--+
>                 |
> LB2--+--squid 3--+
>     |           |
>     +--squid 4--+
>
> The www.example.com has two addresses and uses round-robin to distribute
> the traffic across the load balancers.
>
> Using JMeter, what I'm seeing is that www.example.com is looked up just
> once and uses the same address for all the tests. This means that only
> one of the load-balancers gets any traffic.
>
> Is there some way to overcome this?
>
> Would turning off caching help? (networkaddress.cache.ttl=0 in
> java.security)
>
> Thanks,
>
> R.
> --
> http://robinbowes.com
>
> If a man speaks in a forest,
> and his wife's not there,
> is he still wrong?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org




--

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message