I did not know about the images being dropped. Here are the steps I depicted in the image:
Step 0: Request accepted by OS Step 1: Request sent to Tomcat. Tomcat accepts the request if it's internal queue is not full, else rejects the request Step 2: Tomcat adds the request to the queue if all worker threads are busy, else sends the request to one of the free worker threads Step 3: Request is picked by the worker thread for processing I would like to add a hook between step(1) and step (2). As I mentioned earlier, I want to dynamically control the Tomcat internal queue size based on some application logic. Is there a way to do that? On Sat, May 9, 2020 at 6:16 PM calder <calder....@gmail.com> wrote: > On Sat, May 9, 2020, 07:16 Vikas Kumar <hers...@gmail.com> wrote: > > > 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 > > > > > I'll assume the "steps" are shown in the "broken" image (inline/attached > images are normally dropped) - you'll need the convert whatever text is > contained into actual text and post back. > > > [image: Untitled Diagram.png] > > > > I can add a hook at step (3) using a servlet filter or > > > [ snip ] >