Author: markt Date: Mon Mar 24 12:18:57 2014 New Revision: 1580821 URL: http://svn.apache.org/r1580821 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56304 WebSocket + BIO HTTP + Production = bad idea
Modified: tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/web-socket-howto.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1580821&r1=1580820&r2=1580821&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Mar 24 12:18:57 2014 @@ -92,6 +92,10 @@ operation because the web application is already being serviced, report an error rather than reporting success. (markt) </fix> + <fix> + <bug>56304</bug>: Add a note to the documentation about not using + WebSocket with BIO HTTP in production. (markt) + </fix> </changelog> </subsection> </section> Modified: tomcat/trunk/webapps/docs/web-socket-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/web-socket-howto.xml?rev=1580821&r1=1580820&r2=1580821&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/web-socket-howto.xml (original) +++ tomcat/trunk/webapps/docs/web-socket-howto.xml Mon Mar 24 12:18:57 2014 @@ -49,7 +49,26 @@ code</a>.</p> </section> +<section name="Production usage"> +<p>Although the WebSocket implementation does work with any of the HTTP +connectors, it is not recommended to the WebSocket with the BIO HTTP connector +as the typical uses of WebSocket (large numbers of mostly idle connections) is +not a good fit for the HTTP BIO connector which requires that one thread is +allocated per connection regardless of whether or not the connection is idle. +</p> + +<p>It has been reported (<bug>56304</bug>) that Linux can take large numbers of +minutes to report dropped connections. When using WebSocket with the BIO HTTP +connector this can result in threads blocking on writes for this period. This is +likely to be undesirable. The time taken for the connection to be reported as +dropped can be reduced by using the kernel network parameter +<code>/proc/sys/net/ipv4/tcp_retries2</code>. Alternatively, one of the other +HTTP connectors may be used as they utilise non-blocking IO enabling Tomcat to +implement its own timeout mechanism to handle these cases.</p> +</section> + <section name="Tomcat WebSocket specific configuration"> + <p>Tomcat provides a number of Tomcat specific configuration options for WebSocket. It is anticipated that these will be absorbed into the WebSocket specification over time.</p> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org