In the microservices architecture, we split the system into a number of services, each of which is interdependent by registering and subscribing to each other, and because each service is running in its own process, it can cause a call failure or delay due to network causes or problems with the service itself, which can cause the service to crash as the service backlog. In order to solve this series of problems, a series of service protection mechanisms such as circuit breakers appeared.
Circuit breaker itself is a switch protection mechanism, used in the circuit to protect the line overload, when the circuit has a short circuit, the circuit breaker can promptly cut off the fault circuit, to prevent the occurrence of overload, heat and even fire and other serious consequences.
In a distributed architecture, the role of the circuit breaker pattern is similar.
To address these issues, Spring Cloud Hystrix implements a range of service protection functions such as circuit breakers and line isolation. It is also based on Netflix's open source Framework Hystrix, which aims to provide greater fault tolerance for latency and failure by controlling the nodes that access remote systems, services, and third-party libraries. Hystrix has powerful features such as service degradation, service fusing, thread and signal isolation, request caching, request merging, and service monitoring.
Quick Start
Fifth. Service-tolerant protection: Spring Cloud Hystrix