Ask a Question

Setting for endpoint dns cache

SOLVED
hill_t
New Contributor

Setting for endpoint dns cache

Is there any way to control the dns cache settings for Load UI tests?  The issue is when testing with network changes going on we want to ensure that requests do not continue to go to one server if it is no longer available.  Does anyone have experience with controlling this either through Ready API! settings or a system setting?

1 ACCEPTED SOLUTION

Accepted Solutions
hill_t
New Contributor

Re: Setting for endpoint dns cache

We found a solution to this issue so I wanted to post it here in case someone else was searching for something similar and found my post.

 

Changed the value of networkaddress.cache.ttl property in java.security from -1 to 0. This property indicates how many seconds to cache the most recent successful lookup. A value of -1 means to "cache forever" and a 0 means "never cache".

View solution in original post

5 REPLIES 5

Re: Setting for endpoint dns cache

LoadUI part is not controlling any system caches in any way.

In general it's not clear how dns could be related with availability of the server. 

You could use IP addresses and forget dns. But i think dns is not a real bottleneck in your situation. 

Dmitry Aleshin
LoadUI development team leader
hill_t
New Contributor

Re: Setting for endpoint dns cache

We are doing a test where one set of servers is taken offline and we should start using the other set of servers that is still available.  New tests initiated at that point will correctly go to the set of servers still online but tests already running do not appear to query the dns again and continue to go to the old servers.  I was looking for a way to force it to query the dns at a more frequent interval.

Re: Setting for endpoint dns cache

Are you using the same set of names for old and new server set? What about addresses? Are they the same and unique from session to session? I mean could you just check an IP of the first set in order to switch to another one if first one became unavailable?

Dmitry Aleshin
LoadUI development team leader
hill_t
New Contributor

Re: Setting for endpoint dns cache

Yes, we could do something like that where we try and IP and if it is not available to we try another.  However, part of the point of this test is to make sure we are redirected correctly when one set of servers is taken offline.  So doing something within our tests would really defeat the purpose in this case.

hill_t
New Contributor

Re: Setting for endpoint dns cache

We found a solution to this issue so I wanted to post it here in case someone else was searching for something similar and found my post.

 

Changed the value of networkaddress.cache.ttl property in java.security from -1 to 0. This property indicates how many seconds to cache the most recent successful lookup. A value of -1 means to "cache forever" and a 0 means "never cache".

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: