SpringBoot可以处理多少请求,到不如说Tomcat可以处理多少请求。
关于Tomcat的默认配置,都在spring-configuration-metadata.json文件中,对应的配置类则是org.springframework.boot.autoconfigure.web.ServerProperties
server.tomcat.accept-count等待队列的长度,默认大小是100
server.tomcat.threads.min-spare:最少的工作线程数,默认大小是10

server.tomcat.threads.max:最多的工作线程数,默认大小是200

server.tomcat.max-connections:最大连接数,默认大小是8192

SpringBoot应用通常使用Tomcat作为内置服务器。Tomcat的配置参数如accept-count(等待队列长度,默认100),min-spare-threads(最小工作线程,默认10),max-threads(最大工作线程,默认200)和max-connections(最大连接数,默认8192)影响其处理请求数量的能力。这些参数可以通过SpringBoot的配置文件进行调整以优化性能。
1925

被折叠的 条评论
为什么被折叠?



