hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rae Egli <re...@yahoo.com>
Subject Re: NIO HttpCore - Can requestInput result in two new requests
Date Mon, 18 Aug 2008 04:43:16 GMT
Oleg,
 
> I do not think so. I just ran a simple test using Apache Benchmark with 
> 20 concurrent connections and all looked quite okay to me. I put the 
> reverse proxy in front of a local Tomcat instance. 

Thanks for going through the effort.
 
I actually figured out the problem.  It can easily be seen in the trace I submitted.
 
It occurs if a request (conn1) has not been completed by the Origin and a new input request
is received using a different connection but which goes to the same destination host, in this
case Google.
 
Using the connection reuse startegy, the connection of the first request is reused by the
Origin.  Because the context/ProxyTask is associated with a connection, conn2 now gets the
ProxyTask of conn1 which is in a REQUEST_SENT state and therefore the process fails in the
Origin connect process.
 
By switching from DefaultConnectionReuseStrategy to NoConnectionReuseStrategy and therefore
forcing a new connection in the Origin, I was able to fix the issue as now a new ProxyTask
is associated with every connection from the Client.  However, this is not necessarily desirable.
 
I hope this helps explain the issue.  If you like more detail, please don't hesitate to ask.
 
Rae

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message