I have created simple Spring Boot MVC application and noticed (using JVisualVM
) that all my threads have prefix nio. That mean that Tomcat use java.nio
package. We can add the following params to Tomcat configuration : maxThreads,maxConnections
. As I know that mean:
For example we have maxThreads
= 2 , maxConnections
= 10000, then Selector of first thread (from java.nio
) can handle 10000
concurrent requests, but execute each sequentially according to selectorKeys
and the same behavior for the second thread.
Does it work in this way , if yes how do you usually choose the best option for maxConnections
Thank in advance
(BTW I use Tomcat 8 )