I'm trying to pin down why JMeter sometimes leaves connections in
TIME_WAIT state and sometimes does not.

So I've written an simple app to compare Java and HttpClient.
The app expects URL, autoredirect=true/false, keep-alive=true/false
It connect using either httpclient or java, and then disconnects and exits.

The results seem to be a bit odd:

Example 1: http://www.google.co.uk/ auto-redirect=false, no keep-alive

Neither HttpClient nor Java leave behind a connection in TIME_WAIT state

Example 2: http://www.google.co.uk/ auto-redirect=false, keep-alive=true

Java leaves a socket in TIME_WAIT state, HttpClient does not.

Example 3: http://www.google.com/ auto-redirect=true, keep-alive=false
[Redirects to www.google.co.uk]

Neither HttpClient nor Java leave behind a connection in TIME_WAIT state

Example 4: http://www.google.com/ auto-redirect=true, keep-alive=true
[Redirects to www.google.co.uk]

HttpClient leaves a connection to www.google.com in TIME_WAIT
Java leaves connections to both www.google.com and www.google.co.uk in TIME_WAIT

====

It's a bit odd that HttpClient does not leave a connection in
TIME_WAIT to www.google.co.uk when keep-alive is true, yet it does
leave one to www.google.com.

As far as I can tell, it is the auto-redirect that causes HttpClient
to leave the connection in TIME_WAIT state.

It looks like Java always leaves the connection in TIME_WAIT state if
keep-alive was selected.

Any idea why there is this difference?

Sebb

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to