Hystrix fusible - Cálculo y visualización

fusible de la computación

10 segundos 20 veces, y luego calcular el número de errores excede el valor umbral del 50%, fusible abierto. proveedor de servicio de recuperación, una solicitud exitosa, el fusible está cerrada

http://localhost:9002/actuator/health

hystrix: {
status: "CIRCUIT_OPEN",//熔断开启
details: {
openCircuitBreakers: [
"RestTemplateRequestServiceImpl::smsSend"
]
}
}

hystrix.command.default.circuitBreaker.requestVolumeThreshold 一个rolling window内最小的请求数。如果设为20,那么当一个rolling window的时间内(比如说1个rolling window是10秒)收到19个请求,即使19个请求都失败,也不会触发circuit break。默认20
hystrix.command.default.circuitBreaker.errorThresholdPercentage错误比率阀值,如果错误率>=该值,circuit会被打开,并短路所有请求触发fallback。默认50,即为50%。

Ver monitoreo fusible original

Configuración de Servicios al Consumidor

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

http://localhost:9002/actuator/hystrix.stream,访问会发现一直在ping

visualización

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
		</dependency>
		@EnableHystrixDashboard

http: // localhost: 6101 / hystrix puerto server.port configuración
de entrada de vista original dirección de seguimiento de: http: // localhost: 9002 / actuador / hystrix.stream

la visualización centralizada

Para mostrar un solo foco: Turbina

<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
<!-- eureka客户端 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
turbine:
  app-config: api-1,api-2
  cluster-name-expression: "'default'
   @EnableTurbine

Dirección: http: // localhost: 6102 / turbine.stream, también tiene ping, equivalente a la hystrix.stream original, pero aquí es la combinación de todos los proyectos.

Inicio hystrix-salpicadero.

Visita: http: // localhost: 6101 / hystrix

Llenar la dirección antes mencionada: http: // localhost: 6102 / turbine.stream

visualización Leyenda

Aquí Insertar imagen Descripción

Publicado 25 artículos originales · ganado elogios 0 · Vistas 566

Supongo que te gusta

Origin blog.csdn.net/RaymondCoder/article/details/105316726
Recomendado
Clasificación