i am testing my website using HTTPS. The response time is higher when i used the default implementation. The response time is getting reduced if i use implementation as HTTPclient 3.1. Why there is a difference in response time between HTTPclient 4 and HTTPclient 3.1? To test my website with https, do i need to use HTTPclient 4 or HTTPclient 3.1 ? Which will provide me the exact response time as like in browser?
Below is my sample test plan,
As per HTTP Request documentation
HTTP Request - this has an implementation drop-down box, which selects the HTTP protocol implementation to be used: Java - uses the HTTP implementation provided by the JVM. This has some limitations in comparison with the HttpClient implementations - see below. HTTPClient3.1 - uses Apache Commons HttpClient 3.1. This is no longer being developed, and support for this may be dropped in a future JMeter release. HTTPClient4 - uses Apache HttpComponents HttpClient 4.x. Blank Value - does not set implementationon HTTP Samplers, so relies on HTTP Request Defaults if present or on jmeter.httpsampler property defined in jmeter.properties The Java HTTP implementation has some limitations: There is no control over how connections are re-used. When a connection is released by JMeter, it may or may not be re-used by the same thread. The API is best suited to single-threaded usage - various settings are defined via system properties, and therefore apply to all connections. There is a bug in the handling of HTTPS via a Proxy (the CONNECT is not handled correctly). See Java bugs 6226610 and 6208335. It does not support virtual hosts.
It's better to use HTTPClient4
implementation.
However if you need your requests to be as much like a real browser as possible you need to consider using following components:
Benchmarks I made against local site in HTTPs didn't at all confirm what is being said here.
HttpClient 4 is even now faster than HttpClient 3.1 particularly since 2.10 which fixed an issue in this area:
And even more with 2.11 which made performance improvements:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55857
https://issues.apache.org/bugzilla/show_bug.cgi?id=55865
Also as you can see issue referred to by Dmitri is closed as "Not an issue" as reported problem was wrong.
If you confirm you are not in the cases described in the JIRA, then describing how you are leading your test might help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With