ribbon.ReadTimeout 如何将后台指定 Restful 接口排除在外?

一,问题描述
springcloud 架构,使用 zuul 作为 gateway,gateway 部分配置文件如下:

zuul.host.connect-timeout-millis=15000
zuul.host.socket-timeout-millis=160000

feign.hystrix.enabled=true
feign.client.config.default.connectTimeout=10000
feign.client.config.default.readTimeout=60000
feign.client.config.default.retryer=feign.Retryer.Default

hystrix.command.default.execution.timeout.enable=true
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=120000
circuitBreaker.requestVolumeThreshold=20
circuitBreaker.sleepWindowInMilliseconds=5000
circuitBreaker.errorThresholdPercentage=50

ribbon.ReadTimeout=60000
ribbon.ConnectTimeout=10000

ribbon.MaxAutoRetries=1
ribbon.MaxAutoRetriesNextServer=0
ribbon.OkToRetryOnAllOperations=false

后台某一导出(百万级别)接口需要响应时间较长,1分钟没有响应(因为上面配置的 ribbon.ReadTimeout=60000 ),则会出现以下异常:
ribbon.ReadTimeout 如何将后台指定 Restful 接口排除在外?_第1张图片
经过修改 ribbon.ReadTimeout 的值,可以发现确实是该配置影响的,将其变大确实可以满足需求,但由于该配置文件是全局配置,影响较大,想请问大家有没有其他解决方案,如将某一接口排除在外,或者通过其他配置?

你可能感兴趣的:(问题求助,restful,ribbon,java,spring,cloud,gateway)