jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dzmitry Kashlach <dzmitrykashl...@gmail.com>
Subject Re: DNS Cache Manager: improvement for testing CDN
Date Tue, 12 Aug 2014 14:58:28 GMT
Created issue
https://issues.apache.org/bugzilla/show_bug.cgi?id=56841

-------------------------------------------
"Ўчора" ужо было, "заўтра" яшчэ не прыйшло. У нас ёсць
толькі "сёньня".

tel: +375291142462
skype: dmitry.kashlach



On Sun, Aug 10, 2014 at 11:07 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hello,
> Beside Milamber great notes:
> - add much more comments and javadocs particularly on DNSCacheManager
> - mention in component_reference.xml the use cases for the different
> possible configurations combinations of DNSCacheManager
> - Add Apache header to each file
> - Remove author mention(that's the tradition)
> - add @since 2.12 to classes
>
> Thanks for contribution
> Regards
>
> On Sunday, August 10, 2014, Milamber <milamber@apache.org> wrote:
>
> > Hello,
> >
> > I think we can include the new behavior directly in JMeter (and
> > dns-utils uses the BSD license which is compliant with AL)
> >
> > Your patch is incomplete, when I try to build a distribution, there are
> > these errors (ant task test):
> >
> >      [java] There were 6 failures:
> >      [java] 1)
> >
> >
> testMaven(org.apache.jmeter.JMeterVersionTest)junit.framework.AssertionFailedError:
> > Should have no names left: [dnsjava]. Check ApacheJMeter_parent.pom
> >      [java]     at
> > org.apache.jmeter.JMeterVersionTest.testMaven(JMeterVersionTest.java:184)
> >      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >      [java]     at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >
> >
> > ==> Add dnsjava in Jmeter pom (ApacheJMeter_parent.pom)
> >
> >      [java] 2)
> >
> >
> testEclipse(org.apache.jmeter.JMeterVersionTest)junit.framework.AssertionFailedError:
> > Should have no names left: [dnsjava]. Check eclipse.classpath
> >      [java]     at
> >
> org.apache.jmeter.JMeterVersionTest.testEclipse(JMeterVersionTest.java:155)
> >      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >      [java]     at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >
> >
> > ==> Add dnsjava in libs section in eclipse.classpath file
> >
> >      [java] 3)
> >
> >
> GUIComponents1(org.apache.jmeter.junit.JMeterTest)junit.framework.AssertionFailedError:
> > 'dns_cache_manager_title' should be in resource file for
> > org.apache.jmeter.protocol.http.gui.DNSCachePanel
> >      [java]     at
> > org.apache.jmeter.junit.JMeterTest.GUIComponents1(JMeterTest.java:428)
> >      [java]     at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown
> > Source)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >      [java] 4)
> >
> >
> runGUITitle(org.apache.jmeter.junit.JMeterTest)junit.framework.AssertionFailedError:
> > component_reference.xml needs
> >
> > ==> Add the entry in
> > - messages.properties
> > dns_cache_manager_title=DNS Cache Manager
> >
> > - messages_fr.properties
> > dns_cache_manager_title=Gestionnaire de cache DNS
> >
> >
> >
> > '[res_key=dns_cache_manager_title]' anchor for
> > org.apache.jmeter.protocol.http.gui.DNSCachePanel
> >      [java]     at
> > org.apache.jmeter.junit.JMeterTest.runGUITitle(JMeterTest.java:368)
> >      [java]     at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown
> > Source)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >
> >      [java] 5)
> >
> >
> runSerialTest(org.apache.jmeter.junit.JMeterTest)junit.framework.AssertionFailedError:
> > serialization of org.apache.jmeter.protocol.http.control.DNSCacheManager
> > failed: java.io.NotSerializableException: org.xbill.DNS.Cache
> >      [java]     at
> > org.apache.jmeter.junit.JMeterTest.runSerialTest(JMeterTest.java:506)
> >      [java]     at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown
> > Source)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >
> >
> >
> >
> >      [java] 6)
> >
> >
> runTestElement(org.apache.jmeter.junit.JMeterTest)junit.framework.AssertionFailedError:
> > SaveService nameMap (saveservice.properties) should contain
> > org.apache.jmeter.protocol.http.control.DNSCacheManager
> >      [java]     at
> > org.apache.jmeter.junit.JMeterTest.checkElementAlias(JMeterTest.java:553)
> >      [java]     at
> > org.apache.jmeter.junit.JMeterTest.runTestElement(JMeterTest.java:540)
> >      [java]     at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown
> > Source)
> >      [java]     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      [java]     at
> org.apache.jorphan.test.AllTests.main(AllTests.java:236)
> >      [java]
> >
> >
> > ==> Add in ./bin/saveservice.properties the
> > org.apache.jmeter.protocol.http.control.DNSCacheManager entry
> >
> >
> >      [java] FAILURES!!!
> >      [java] Tests run: 2530,  Failures: 6,  Errors: 0
> >
> >
> > In addition,
> >
> > - don't use wildcard in import directive
> > import org.xbill.DNS.*;
> >
> >
> > - in DNSCachePanel.java, some strings must be internationalize (I18N)
> > (messages.properties)
> > + private static final String ADD_COMMAND = "Add"; // $NON-NLS-1$
> > + private static final String DELETE_COMMAND = "Delete"; // $NON-NLS-1$
> > + private static final String SYS_RES_COMMAND = "Use system DNS
> > resolver"; // $NON-NLS-1$
> > + private static final String CUST_RES_COMMAND = "Use custom DNS
> > resolver"; // $NON-NLS-1$
> > ....
> > + private static final String[] COLUMN_RESOURCE_NAMES = {
> > + ("NAME/IP"), //$NON-NLS-1$
> > ...
> > + private String DNS_SERVERS_TABLE_NAME="DNS Servers";
> > ...
> > + sysResButton.setToolTipText("Use system DNS resolver");
> > ...
> > custResButton.setToolTipText("Use custom DNS resolver");
> > etc.
> >
> > Note : Add / Delete strings are already in messages.properties
> >
> >
> > - the DNS cache panel must offer in default option : Use system DNS
> > resolver (not the custom)
> >
> > - Add the default value in setProperty, to allow the save service don't
> > save the default value in JMX file (only the custom values)
> >
> > Like this :
> > public static final String SERIES_SELECTION_REGEXP =
> > "RespTimeGraph.seriesselectionregexp"; // $NON-NLS-1$
> > [...]
> > public static final boolean DEFAULT_REGEXP = true;
> > [...]
> > in configure()
> > regexpChkBox.setSelected(te.getPropertyAsBoolean(SERIES_SELECTION_REGEXP,
> > DEFAULT_REGEXP));
> > [...]
> > in modifyTestElement(
> > te.setProperty(SERIES_SELECTION_REGEXP, regexpChkBox.isSelected(),
> > DEFAULT_REGEXP);
> >
> > - avoid to change code formatting in the same patch with a new behavior
> > (for a better history of changes)
> >
> > Like this:
> > - private SystemDefaultDnsResolver systemDefaultDnsResolver=null;
> > - private Map<String,InetAddress[]> cache = null;
> > + private SystemDefaultDnsResolver systemDefaultDnsResolver = null;
> > + private Map<String, InetAddress[]> cache = null;
> > + private Resolver resolver = null;
> > //++ JMX tag values
> >
> > The better way is to provide a patch with the new behavior and without
> > code formatting on the existing code, and signal to the dev team that
> > the code needs a code formatting.
> >
> > - seems have a bug, when I try to load a JMX file with a DNS cache
> > manager with the saving configuration : Use system DNS resolver: The
> > option is transform to "Use custom DNS resolver" and the DNS Servers
> > table is disabled.
> >
> > - Add some docs in component_reference.xml
> >
> >
> > Please provide a patch in diff format (tools like Eclipse make this task
> > easy) and upload the patch in the Bugzilla (perhaps a new issue, Bug
> > 43730 seems not directly related)
> >
> > Milamber
> >
> >
> >
> >
> > Le 10/08/2014 15:12, Dzmitry_Kashlach a ecrit :
> > > Hi JMeter Team,
> > >
> > >     JMeter has a problem with testing services that have DNS
> round-robin
> > > balancing, CDNs in particular. The paradigm "1 thread" ="1 virtual
> user"
> > is
> > > used in majority of tests  and it would be logical, if every virtual
> user
> > > resolved address on its own. JVM DNS cache prevents from it.
> > > I've done some research in JMeter mailing lists and found several
> > > user-requests with the same problem:  DNS-Cache-when-using-Amazon-ELB
> > > <
> >
> http://jmeter.512774.n5.nabble.com/DNS-Cache-when-using-Amazon-ELB-td5715972.html
> > >
> > > ,  DNS-round-robin-and-JVM-DNS-lookup-caching
> > > <
> >
> http://jmeter.512774.n5.nabble.com/DNS-round-robin-and-JVM-DNS-lookup-caching-td524221.html
> > >
> > >     Completely turning off JVM DNS cache doesn't solve the problem
> > ideally
> > > because in this case DNS request are sent too often.
> > >     I've developed DNS Cache Manager for obtaining desired behavior "1
> > > virtual user - 1 DNS cache". But this plugin requires changes in
> > > HTTPSamplerBase code to pass to HTTP Client alternative DNS resolver.
> For
> > > now, HTTPSamplerBase does not apply third-party config elements because
> > of
> > > hardcoded list of class names.
> > > Plugin was successfully tested huge CDN provider and I would like to
> > share
> > > it with community, because it could be usefull in performance testing.
> > > I see two possible ways to contribute it:
> > >  1. I can prepare a patch with minimal changes, which make HTTP Sampler
> > able
> > > to apply   third-party config elements and allow to change default DNS
> > > resolver to alternate. This allows not to  include required dnsjava
> > library
> > > into JMeter and not commit full code of DNS Cache Manager into
> > repository.
> > > 2. We can simply commit all changes in JMeter, add dnsjava as
> dependency,
> > > and get flexible DNS Cache Manager out-of-box. You can see
> implementation
> > > via the following links:
> > > DNSCacheManager
> > > <
> >
> https://github.com/Blazemeter/jmeter/blob/2d3ccd00f4b824e43cb8c1ea2cb5f19cd7cf56b0/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java
> > >
> > > DNSCachePanel
> > > <
> >
> https://github.com/Blazemeter/jmeter/blob/2d3ccd00f4b824e43cb8c1ea2cb5f19cd7cf56b0/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java
> > >
> > > HTTPHC4Impl
> > > <
> >
> https://github.com/Blazemeter/jmeter/blob/2d3ccd00f4b824e43cb8c1ea2cb5f19cd7cf56b0/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
> > >
> > > HTTPSamplerBase
> > > <
> >
> https://github.com/Blazemeter/jmeter/blob/2d3ccd00f4b824e43cb8c1ea2cb5f19cd7cf56b0/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
> > >
> > > BTW, there is already an  issue in bugzilla
> > > <https://issues.apache.org/bugzilla/show_bug.cgi?id=43730>  , related
> to
> > > this problem.
> > > I'd like to hear comments from contributors about my suggestion, please
> > > guide me.
> > >
> > > Thanks,
> > > Dzimitry
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://jmeter.512774.n5.nabble.com/DNS-Cache-Manager-improvement-for-testing-CDN-tp5720797.html
> > > Sent from the JMeter - Dev mailing list archive at Nabble.com.
> > >
> >
> >
>
> --
> Cordialement.
> Philippe Mouawad.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message