How to see the number of requests in queue in Spring Boot application?

Viewed 567

I have a Spring Boot app where I have specified Tomcat properties like max-thread as 4 and max-connections as 2. So, if I hit the application with 8 requests (each endpoint gives response after a delay of 5 seconds, so the threads will remain busy) - then, 4 working threads will be occupied, 2 requests will be in queue, the rest will be rejected.

However, how do I see or count how many requests are currently in the queue?

1 Answers

If your request and parameter are same, the requests will be added and handled in queue and getting some delays on the each requests, to avoid this delay, you can append datetimestamp(in long value) in each request parameter, then the service request thread will process parellely,

The request params like

<your_url>?paramName=paramsValue&_dc=1655707236193

Related