服务熔断
服务端:某个服务超时或者异常 引起熔断 保险丝
服务降级
客户端:从整体网站请求负载考虑 当某个服务熔断或者关闭之后 服务将不再调用 此时在客户端可以准备一个回调 ==fallbackFactory = DeptClientServiceFallbackFactory.class == 返回一个默认值(缺省值) 整体服务水平下降 但是好歹能用 比直接挂掉强
http://localhost:8001/actuator/hystrix.stream
ping:
data: {"type":"HystrixCommand","name":"getDept","group":"DeptController","currentTime":1627539451049,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":34,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountFallbackEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackMissing":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":10,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":10,"rollingCountSuccess":34,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":0,"rollingMaxConcurrentExecutionCount":1,"latencyExecute_mean":4,"latencyExecute":{"0":0,"25":2,"50":2,"75":3,"90":4,"95":4,"99":11,"99.5":11,"100":337},"latencyTotal_mean":4,"latencyTotal":{"0":0,"25":2,"50":2,"75":3,"90":4,"95":5,"99":11,"99.5":11,"100":337},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":1000,"propertyValue_executionTimeoutInMilliseconds":1000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"DeptController"}
data: {"type":"HystrixThreadPool","name":"DeptController","currentTime":1627539451049,"currentActiveCount":0,"currentCompletedTaskCount":176,"currentCorePoolSize":10,"currentLargestPoolSize":10,"currentMaximumPoolSize":10,"currentPoolSize":10,"currentQueueSize":0,"currentTaskCount":176,"rollingCountThreadsExecuted":34,"rollingMaxActiveThreads":1,"rollingCountCommandRejections":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"reportingHosts":1}