On 08/04/2013 15:32, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chuck,

On 4/8/13 8:30 AM, Caldarale, Charles R wrote:
From: Anton Piatek1 [mailto:anton.pia...@uk.ibm.com] Subject: Re:
websockets holding on to threads.

My thinking about it being a bug is that to support N clients
with websockets, you need N threads available on tomcat, even
though they are only getting updates every x seconds.

I don't know if this will have any effect, but try using the NIO
<Connector> instead of the BIO one.  Set the protocol attribute to
org.apache.coyote.http11.Http11NioProtocol and see what happens.

+1

I think there was a recent discussion about using Websocket under BIO:
basically, you go back to sucking again.

Short version:

BIO = 1 thread per connection (doesn't scale)

NIO/APR = 1 thread per currently processed frame

i.e. NIO/APR allocate a thread to process an incoming frame and that thread stays allocated until the frame has been completely read. Putting it another way NIO and APR are non-blocking between frames and blocking within frames. Writes always block.

Mark

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

Reply via email to