On 01/08/2019 21:10, john.e.gr...@wellsfargo.com.INVALID wrote:
> Folks,
> 
> I've been using Tomcat for a long time but am new-ish to NIO (Tomcat 8.5.)  
> It seems that one of the big benefits of NIO is decoupling the worker threads 
> from the client connections.  I can now have a large number of open 
> connections without a corresponding large number of threads.
> 
> I know the acceptCount parameter will stop incoming connection requests if 
> the server is overloaded.  However, suppose I have 1000 open connections and 
> 100 of those connections have a request in flight, using all 100 of the 
> threads I've allocated.  Now what happens if the other 900 connections 
> suddenly send me requests?

They wait until either the client times out waiting to read the response
or one of the 100 allocated threads completes the request/response it
was working and takes the next of the 900 waiting requests off the queue.

> Does acceptCount play any role?

No, no with those numbers. If you increase that 900 then acceptCount
will - eventually - play a role.

>  Is there some other mechanism that I can use to fail fast (by sending back a 
> 503, for example?)

Short of decreasing maxConnections, no.

Mark

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

Reply via email to