接上文,我在接口的并发量压到了500。 发现了A服务调用B服务的时候请求失败,直接进入熔断。经过hystrix和dashaboard监控发现B服务没有接受到请求。 推断是A服务的hystrix配置有问题。
现将实践配置粘到下方。
#hystrix的超时时间 hystrix: command: default: execution: timeout: enabled: true isolation: strategy: THREAD thread: timeoutInMilliseconds: 92000 # interruptOnTimeout: false circuitBreaker: requestVolumeThreshold: 1000 fallback: enabled: true threadpool: # 这是默认的配置 default: coreSize: 200 maxQueueSize: 500 queueSizeRejectionThreshold: 500
请在使用的时候注意缩进。
目前500个并发A服务调用B调用是可以正常响应的。不过仍然有问题,响应速度有些慢。 下面会在接着优化的。
来源:51CTO
作者:田培融
链接:https://blog.csdn.net/u011296165/article/details/100690664