Recently encountered one specific requirement where the development team and the network team requested us to disable DNS caching. We were trying to perform few performance test cases for the fail over testing. While switching the traffic from one server to another server, network team wants us to disable the DNS caching from our end.
We will see how to disable DNS Caching in HP LoadRunner.
What is DNS Caching?
Domain Name System cache entries helps us to translate domain names into IP addresses. The caching involves in both the client and server side that contact DNS servers. Caching expedites the lookup and it will reside for a period of time called TTL (Time to Live). If the TTL reaches zero, the entries will delete or purged from the cache.
How to enable DNS Caching?
I have already created a script using Web Services protocol. To disable the DNS cache, I navigated to runtime settings in web services protocol script. But I didn’t found one.
How to solve this?
To enable DNS Caching, you need to create a script using Web HTTP/HTML protocol. You can convert all your SOAP or JMS calls using web_custom_request in Web HTTP/HTML protocol. Once the migration is done, go to Runtime Setting > Click on Preferences under Internet Protocol group. Then check the DNS Caching option under General as shown below.
By default, DNS Caching is disabled. Once it is enabled, LoadRunner save host’s IP address to a cache entry which will save the time in the subsequent calls.
If you like my article, please do share in your favorite social media. Please do not forget to subscribe to my weekly newsletter, it is FREE.