I'm running a load test using a JMeter, and my load test is consuming a lot of TCP connections. The machine that creates the load is not experiencing the Ephemeral port exhaustion, but a router trough the load was created, run out of NAT tablespace so I came to think if JMeter uses the connections like real browser. So far it seems that Jmeter exhausts connections more than real browser. My questions is that how could I create load that uses TCP connections like real browser would across the whole network ( If that is possible ).
I'm using JMeter 5.0. The calls in script use HttpClient4. The "Use KeepAlive" is checked. When I run the test and check the TCP connection status in my local computer, the active connections makes sense, but there is enormous amount of tcp connections in "TIME_WAIT" state. ( eg. 120 threads running, 3200 load test related connections total, mostly in TIME_WAIT ). Is there something I could do to make Jmeter to reuse the same connections?
When I do the same transactions with real browsers, the amount of connections does not rise. ( With Chrome the amount of TCP connections stay at 6 per user. Using Firefox the amount seems to rise slowly, but way slower than when using Jmeter. )
My browsers use HTTP 2, and Jmeter script goes with HTTP 1.1. Would this make the difference here?