Hystrix 默认加载的配置文件 - 限流、 熔断示例
#线程池的大小
Hystrix.threadpool.default.coreSize=1
#缓冲区大小,如果为-1则不缓冲,直接进行降级 fallback
hystrix.threadpool.default.maxQueueSize=200
#缓冲区的阈值,超限则直接降级
hystrix.threadpool.default.queueSizeRejectionThreshold=2
#执行策略
#资源隔离模式,默认thread,还有一种叫信号量
hystrix.command.default.execution.isolation.strategy=THREAD
#是否打开超时
hystrix.command.default.execution.timeout.enabled=true
#超时时间 默认1000毫秒
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=2000
超时时中断线程
hystrix.command.default.execution.isolation.thread.interruptOnTimeout=true
#取消的时候中断进程
hystrix.command.default.execution.isolation.thread.interruptOnFutureCancel=false
#信号量模式下,最大并发量
hystrix.command.default.execution.isolation.semaphore.maxConcurrentRequests=2
#降级