Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS Cache Manager doesn't check all DNS servers for a match and doesn't honor Clear Cache After Each Iteration setting #6238

Open
rithvikp1998 opened this issue Feb 14, 2024 · 2 comments

Comments

@rithvikp1998
Copy link
Contributor

Expected behavior

I have observed two different problems with DNS Cache Manager:

  1. DNS Cache Manager takes a list of DNS servers and round-robins through them for every lookup. However, for any given lookup, if the DNS server returns a failure, cache manager fails the request instead of checking the next server. This is problematic while trying to use a list of zoned authoritative servers as every server may not have all the records. This is in contrast to behavior of say /etc/resolv.conf in Linux which checks the next server in the list until it finds a match. I checked the code and this is happening because DNS cache manager is using dnsjava's ExtendedResolver under the hood which only tries a different server if there is an IOException while making request to the current server. Even if the current server refuses the request without throwing an exception, ExtendedResolver returns an empty result without trying a different server.

  2. DNS Cache Manager has a setting to Clear Cache After Each Iteration. When enabled, it clears the JMeter thread-local cache before starting the next iteration. However, it doesn't clear the DNS resolver's cache so the result could still be coming from a cache. To test this, I created a simple test with 10 iterations of a http request and enabled the clear cache setting and captured the DNS requests using Wireshark. The expectation is that there'd be 10 calls to DNS, however there is only 1 call to DNS and remaining 9 requests are using the cached value.

Actual behavior

No response

Steps to reproduce the problem

Any JMeter test with a DNS cache manager would reproduce the issue.

JMeter Version

5.5

Java Version

8

OS Version

Windows 11

@rithvikp1998
Copy link
Contributor Author

I'd be happy to provide more details or even a patch if the issue is confirmed

@rithvikp1998
Copy link
Contributor Author

@vlsi Can you please help us evaluate the issue? (Not sure who else to tag :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant