1 Star 0 Fork 0

Durian/tensqaure_config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
web-dev.yml 2.79 KB
一键复制 编辑 原始数据 按行查看 历史
Durian 提交于 2020-02-16 19:42 . update web-dev.yml.
server:
port: 9000
spring:
application:
name: tensquare-web
eureka:
client:
service-url:
defaultZone: http://192.168.113.132:8761/eureka
instance:
# 模块间跨IP访问
prefer-ip-address: true
# 服务提供方配置
# 服务刷新时间配置,每隔这个时间会主动心跳一次 默认 30s
lease-renewal-interval-in-seconds: 5
# 服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
# 注意,EurekaServer一定要设置eureka.server.eviction-interval-timer-in-ms否则这个配置无效,默认90s
# 这个配置一般为服务刷新时间配置的三倍
lease-expiration-duration-in-seconds: 15
zuul:
routes:
tensquare-gathering:
path: /gathering/**
serviceId: tensquare-gathering
tensquare-article:
path: /article/**
serviceId: tensquare-article
tensquare-base:
path: /base/**
serviceId: tensquare-base
tensquare-friend:
path: /friend/**
serviceId: tensquare-friend
tensquare-qa:
path: /qa/**
serviceId: tensquare-qa
tensquare-recruit:
path: /recruit/**
serviceId: tensquare-recruit
tensquare-spit:
path: /spit/**
serviceId: tensquare-spit
tensquare-user:
path: /user/**
serviceId: tensquare-user
tensquare-search:
path: /search/**
serviceId: tensquare-search
tensquare-sms:
retry: false
path: /sms/**
serviceId: tensquare-sms
host:
max-total-connections: 200 # 适用于ApacheHttpClient,如果是okhttp无效。每个服务的http客户端连接池最大连接,默认是200.
max-per-route-connections: 10 # 适用于ApacheHttpClient,如果是okhttp无效。每个route可用的最大连接数,默认值是20。
socket-timeout-millis: 50000
connect-timeout-millis: 50000
semaphore:
max-semaphores: 128
retryable: true
sensitive-headers:
- Cookie, Set-Cookie, Authorization
ribbon:
ReadTimeout: 3000 # 获取或设置读取操作未完成时发生超时之前的毫秒数。 请求处理时间
ConnectTimeout: 2000 # 客户端等待与服务器建立连接的时间(以毫秒计) 连接时间
MaxAutoRetries: 1 # 在同一台服务器上重试的最大次数
MaxAutoRetriesNextServer: 1 # 要重试的下一个服务器的最大数量
OkToRetryOnAllOperations: true # 默认为false,则只允许GET请求被重试
hystrix:
command:
default:
execution:
isolation:
thread:
# t这里需要注意的是hystrix的配置时间应该大于ribbon全部重试时间的总和,上面我配置的是2次重试,包括首次请求,三次时间是6秒
timeoutInMilliseconds: 20000
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/durianyang/tensqaure_config.git
git@gitee.com:durianyang/tensqaure_config.git
durianyang
tensqaure_config
tensqaure_config
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385