@ -528,12 +528,12 @@ example `eureka.instance.hostname=${HOST_NAME}`.
@@ -528,12 +528,12 @@ example `eureka.instance.hostname=${HOST_NAME}`.
Netflix has created a library called https://github.com/Netflix/Hystrix[Hystrix] that implements the http://martinfowler.com/bliki/CircuitBreaker.html[circuit breaker pattern]. In a microservice architecture it is common to have multiple layers of service calls.
A service failure in the lower level of services can cause cascading failure all the way up to the user. When calls to a particular service is greater than `circuitBreaker.requestVolumeThreshold` (default: 20 requests) and failue percentage is greater than `circuitBreaker.errorThresholdPercentage` (default: >50%) in a rolling window defined by `metrics.rollingStats.timeInMilliseconds` (default: 10 seconds), the circuit opens and the call is not made. In cases of error and an open circuit a fallback can be provided by the developer.
Having an open circuit stops cascading failures and allows overwhelmed or failing services time to heal. The fallback can be another Hystrix protected call, static data or a sane empty value. Fallbacks may be chained so the first fallback makes some other business call which in turn falls back to static data.
@ -639,7 +639,7 @@ To enable the Hystrix metrics stream include a dependency on `spring-boot-starte
@@ -639,7 +639,7 @@ To enable the Hystrix metrics stream include a dependency on `spring-boot-starte
One of the main benefits of Hystrix is the set of metrics it gathers about each HystrixCommand. The Hystrix Dashboard displays the health of each circuit breaker in an efficient manner.
@ -1926,7 +1926,7 @@ maps all paths in "/api/{all}" to the Zuul filter chain.
@@ -1926,7 +1926,7 @@ maps all paths in "/api/{all}" to the Zuul filter chain.
=== Disable Zuul Filters
Zuul for Spring Cloud comes with a number of `ZuulFilter` beans enabled by default
in both proxy and server mode. See https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters[the zuul filters package] for the
in both proxy and server mode. See https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-zuul/src/main/java/org/springframework/cloud/netflix/zuul/filters[the zuul filters package] for the
possible filters that are enabled. If you want to disable one, simply set
`zuul.<SimpleClassName>.<filterType>.disable=true`. By convention, the package after
`filters` is the Zuul filter type. For example to disable
@ -2598,7 +2598,7 @@ The counter records a single time-normalized statistic.
@@ -2598,7 +2598,7 @@ The counter records a single time-normalized statistic.
A timer is used to measure how long some event is taking. Spring Cloud automatically records timers for Spring MVC requests and conditionally `RestTemplate` requests, which can later be used to create dashboards for request related metrics like latency:
@ -138,6 +138,7 @@ public class HystrixStreamTask implements ApplicationContextAware {
@@ -138,6 +138,7 @@ public class HystrixStreamTask implements ApplicationContextAware {
@ -103,6 +104,9 @@ public class TurbineStreamConfiguration implements SmartLifecycle {
@@ -103,6 +104,9 @@ public class TurbineStreamConfiguration implements SmartLifecycle {
returnoutput.doOnUnsubscribe(
()->log.info("Unsubscribing RxNetty server connection"))