On 17/10/2012 11:02, André Warnier wrote:
> Mark Thomas wrote:
>> On 17/10/2012 10:49, André Warnier wrote:
>>> 1) So it means that if a client connects to the server, but does not
>>> send any request line for a while on that connection, the server will
>>> allocate a thread to serve the request; this thread will wait up to 20 s
>>> (on HTTP) or 60 s. (on HTTPS), before timing out and returning to the
>>> pool of available threads.
>>> Of course only a malicious client would do that..
>>
>> Nope. This is the NIO connector. The request line is read using
>> non-blocking IO. The (simulated) blocking IO only starts once the first
>> header is received and continues until the entire request is received.
>> It then goes back to non-blocking for the next request line.
>>
>>
>>> 2) it also means that a perfectly non-malicious client can connect to
>>> the server, and send a first request on the connection; the server will
>>> allocate a thread to handle this request; and then, if the same client
>>> has no more requests to send for a while, this thread will nevertheless
>>> remain waiting on this connection for 20 s. (HTTP) or 60 s. (HTTPS),
>>> just in case the client /would/ send another request on it.
>>> During this time, the thread is unavailable to process other client
>>> requests.
>>
>> Again, nope. The thread is released between the requests.
>>
> 
> Sorry, I stand corrected, I missed the NIO part.
> 
> For the record, is the above correct for the standard BIO connector 
> (and in part for the APR connector) ?

BIO yes, the above is correct.

NIO is actually non-blocker for the request headers as well.

APR is is non-blocking between requests.

See the summary chart at [1] for more.

Mark

[1]
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to