As per my understanding (using a Spring Boot app with Tomcat server), we
define:

   - Max no. of worker threads (maxThreads, default 200)
   - Tomcat queue size (maxConnections, default 8192 for APR, 10000 for
   NIO). When all worker threads are busy, requests are placed into the queue.
   As worker threads free up, queued requests are sent to them in FIFO order

[image: Untitled Diagram.png]

I can add a hook at step (3) using a servlet filter or request interceptor
for pre and post-processing of the request.

My question is: can I add a similar hook at step (2)? Basically I want to
dynamically control the Tomcat queue size based on some application logic.

Reply via email to