|Summary:||Drop "Use Keep-Alive" option altogether|
|Product:||JMeter||Reporter:||Michael Osipov <michaelo>|
|Component:||HTTP||Assignee:||JMeter issues mailing list <issues>|
Description Michael Osipov 2018-04-05 12:21:44 UTC
JMeter 4.0 sports HttpClient 4.5.x and Java URLConnection by default. Both use HTTP/1.1 only, one cannot control this in JMeter anyway (for the good). Having the option "Use Keep-Alive" makes no sense. HTTP/1.1 is persistent by default. Infact, "Connection: Keep-Alive" is an invalid header field for HTTP/1.1. Closing is a performance penalty for client and server which is the default in a new test plan. I see no benefit to have this option around at all anymore. For those who want to fiddle with connections can use a header manager for "Connection: close". The enhancement request to remove this altogether from GUI and code.
Comment 1 UbikLoadPack support 2018-04-05 13:10:28 UTC
Maybe it should be renamed and inversed to "Don't reuse connection". In HC4 and Java impelementation, if it's true, then "Connection: close" would be added so that it's easier for newbies. Also in jmeter.properties, the below property should be documented to mention it only related to AJP: # Set the http version (defaults to 1.1) # Only used by AjpSampler httpclient.version=1.1
Comment 2 Michael Osipov 2018-04-05 14:06:38 UTC
(In reply to UbikLoadPack support from comment #1) > Maybe it should be renamed and inversed to "Don't reuse connection". > In HC4 and Java impelementation, if it's true, then "Connection: close" > would be added so that it's easier for newbies. That would make sense, but would still be a little deceiving because if hc.paramters is change for 1.0 there wouldn't be a way to add "Connection: Keep-Alive" for HTTP/1.0 explicitly unless the header manager is used. Note that this isn't a valid 1.1 header. So, for sanity, I'd drop it altogether to avoid such issues. > Also in jmeter.properties, the below property should be documented to > mention it only related to AJP: > > # Set the http version (defaults to 1.1) > # Only used by AjpSampler > httpclient.version=1.1 Likely, but I rather drop that code block to be consistent with the HTTPSampler. This version 4.0 after all. One can still use 2.x or 3.x for ancient stuff.