具体参数大小根据自己系统评估。
1、gateway
gateway采用的是netty容器,添加如下配置。
java
server:
netty:
connection-timeout: 5000
spring:
cloud:
gateway:
httpclient:
connect-timeout: 5000
pool:
# 最大连接数
max-connections: 200
# 获取连接的超时时间
acquire-timeout: 5000
type: fixed
2、nacos
java
server.tomcat.connection-timeout=5000
server.tomcat.max-connections=200
server.tomcat.max-threads=100
3、springboot tomcat
java
server:
tomcat:
threads:
max: 200
min-spare: 30
max-swallow-size: -1
acceptCount: 100
connection-timeout: 5000
max-connections: 500