tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shrikant patel <>
Subject Tomcat 6.0.18 related NIO questions.
Date Wed, 22 Dec 2010 16:31:40 GMT
We are using tomcat connector as follows -->
<Connector connectionTimeout="500000" port="8080" protocol="HTTP/1.1" ...

Based on the documentation we are using the blocking call, right? So the
servlet thread is blocked for IO while reading request and writing response.

In case we want to use NIO, we have to specify protocol as
org.apache.coyote.http11.Http11NioProtocol - non blocking Java connector,
org.apache.coyote.http11.Http11AprProtocol - the APR connector.

I have basic understanding of NIO. My understanding is that tomcat
internally use Java NIO to read the request into buffer. When complete
request is read then dispatch it to servlet for processing. That way each
servlet thread is not blocked on IO. Similarly in case of response, it get
response from servlet, keep buffering it and send it to client. This way
servlet is not completely blocked for entire duration of the response being
send to client.
Please let me know if this is correct.

Is there document in this regards you can point to get better understanding?

I have googled, i do get many article but about NIO in general nothing
specific to how tomcat handles it.

Thanks in Advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message