springcloud参数调优

版权声明:lpf https://blog.csdn.net/justlpf/article/details/84345539

Tomcat配置参数

server:
    tomcat:
        max-connections: 0
        max-threads: 0

Hystrix配置参数

# 如隔离策略是THREAD:
hystrix.threadpool.default.coreSize:10
hystrix.threadpool.default.maximumSize:10
hystrix.threadpool.default.maxQueueSize:-1
# 如该值为-1,那么使用的是SynchronousQueue,否则使用的是LinkedBlockingQueue。
# 注意,修改MQ的类型需要重启。例如从-1修改为100,需要重启,因为使用的Queue类型发生了变化

#如果想对特定的 HystrixThreadPoolKey 进行配置,则将 default 改为 HystrixThreadPoolKey 即可。

#如果隔离策略是SEMAPHORE:
hystrix.command.default.execution.isolation.strategy: SEMAPHORE
hystrix.command.default.execution.isolation.semaphore.maxConcurrentRequests:10# 默认值

#如果想对指定的 HystrixCommandKey 进行配置,则将 default 改为 HystrixCommandKey 即可。

Feign配置参数

#Feign默认没有线程池。
#当使用HttpClient时,可如下设置:
feign:
  httpclient:
    enabled:true
    max-connections: 200 # 默认值
    max-connections-per-route: 50 # 默认值

#开启断路器功能, feign默认该功能关闭
feign.hystrix.enabled: true
# 配置请求GZIP压缩
feign.compression.request.enabled: true
# 配置响应GZIP压缩
feign.compression.response.enabled: true
# 配置压缩支持的MIME TYPE
feign.compression.request.mime-types: text/xml,application/xml,application/json
# 配置压缩数据大小的下限
feign.compression.request.min-request-size: 2048

猜你喜欢

转载自blog.csdn.net/justlpf/article/details/84345539