场景:门店服务调用其他外服务共计26个,每个服务都由Hystrix统一配置线程数
配置如下:
hystrix.threadpool.default.coreSize = 50
hystrix.threadpool.default.maxQueueSize = 1000
hystrix.threadpool.default.queueSizeRejectionThreshold = 1000
查看服务性能如下:
经过查阅资料,了解hystrix配置参数后,发现可针对调用外服务的FeignClient单独配置相关参数:
参靠:https://blog.csdn.net/tongtong_use/article/details/78611225
hystrix.threadpool.default.coreSize = 30
hystrix.threadpool.default.maxQueueSize = 1000
hystrix.threadpool.default.queueSizeRejectionThreshold = 1000
hystrix.threadpool.BSS-MS.coreSize = 50
hystrix.threadpool.BSS-MS.maxQueueSize = 1000
hystrix.threadpool.BSS-MS.queueSizeRejectionThreshold = 1000
hystrix.threadpool.SBS-MS.coreSize = 80
hystrix.threadpool.SBS-MS.maxQueueSize = 1000
hystrix.threadpool.SBS-MS.queueSizeRejectionThreshold = 1000
针对需要高线程的服务设置大一些,低频率使用的服务设置小一些
线程数明显降低,此时我们的线程使用频率如图:
稳!
持续关注服务性能3天,无特殊异常,服务器线程优化完成