From 0bb2d1e4920d46951d2054fffc325bcadbddbf05 Mon Sep 17 00:00:00 2001 From: zlt Date: Sun, 17 Mar 2019 20:45:39 +0800 Subject: [PATCH] =?UTF-8?q?zuul=20=E9=85=8D=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.properties | 3 --- .../src/main/resources/application.properties | 13 ++++--------- .../src/main/resources/application.yml | 14 ++++++++++++++ .../zuul-gateway/src/main/resources/bootstrap.yml | 2 -- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/zlt-config/src/main/resources/application-dev.properties b/zlt-config/src/main/resources/application-dev.properties index 0a83e1ca..0b123765 100644 --- a/zlt-config/src/main/resources/application-dev.properties +++ b/zlt-config/src/main/resources/application-dev.properties @@ -1,7 +1,4 @@ ########################## 统一变量配置 ########################## -##### eureka配置 - 已经换成Nacos所以注释掉 -#zlt.eureka.client.serviceUrl.defaultZone=http://192.168.28.130:1111/eureka - ##### 数据库配置 zlt.datasource.ip=192.168.28.131 zlt.datasource.username=root diff --git a/zlt-config/src/main/resources/application.properties b/zlt-config/src/main/resources/application.properties index df32a0ee..7ccca803 100644 --- a/zlt-config/src/main/resources/application.properties +++ b/zlt-config/src/main/resources/application.properties @@ -7,20 +7,13 @@ management.endpoints.web.exposure.include=* management.endpoint.health.show-details=always -##### eureka配置 - 已经换成Nacos所以注释掉 -# 注册服务ip到eureka server上 -#eureka.instance.prefer-ip-address=true -# 自定义服务实例id -#eureka.instance.instance-id=${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} - - ##### ribbon配置 # 从注册中心刷新servelist的时间 默认30秒,单位ms ribbon.ServerListRefreshInterval=15000 #请求连接的超时时间 默认1秒,单位ms -ribbon.ConnectTimeout=15000 +ribbon.ConnectTimeout=30000 # 请求处理的超时时间 默认1秒,单位ms -ribbon.ReadTimeout=15000 +ribbon.ReadTimeout=30000 # 对所有操作请求都进行重试,不配置这个MaxAutoRetries不起作用 默认false #ribbon.OkToRetryOnAllOperations=true # 对当前实例的重试次数 默认0 @@ -34,6 +27,8 @@ feign.sentinel.enabled=true feign.hystrix.enabled=false feign.okhttp.enabled=true feign.httpclient.enabled=false +feign.httpclient.max-connections=1000 +feign.httpclient.max-connections-per-route=100 feign.client.config.feignName.connectTimeout=30000 feign.client.config.feignName.readTimeout=30000 feign.compression.request.enabled=true diff --git a/zlt-gateway/zuul-gateway/src/main/resources/application.yml b/zlt-gateway/zuul-gateway/src/main/resources/application.yml index ae225955..66f8eb24 100644 --- a/zlt-gateway/zuul-gateway/src/main/resources/application.yml +++ b/zlt-gateway/zuul-gateway/src/main/resources/application.yml @@ -115,6 +115,20 @@ zuul: strip-prefix: true ssl-hostname-validation-enabled: false +hystrix: + threadpool: + default: + coreSize: 100 + maximumSize: 2000 + allowMaximumSizeToDivergeFromCoreSize: true + maxQueueSize: -1 + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 60000 + swagger: butler: api-docs-path: v2/api-docs diff --git a/zlt-gateway/zuul-gateway/src/main/resources/bootstrap.yml b/zlt-gateway/zuul-gateway/src/main/resources/bootstrap.yml index da1d62ea..bd95d8cb 100644 --- a/zlt-gateway/zuul-gateway/src/main/resources/bootstrap.yml +++ b/zlt-gateway/zuul-gateway/src/main/resources/bootstrap.yml @@ -1,8 +1,6 @@ server: port: 9900 undertow: - io-threads: 16 - worker-threads: 256 buffer-size: 1024 direct-buffers: true