What is a circuit breaker? Talk about the service avalanche effect? What Causes the Service Avalanche Effect?

Short circuit:

The fuse mechanism (short circuit breaker) is a microservice link protection mechanism to deal with the avalanche effect.

When a microservice on the link is unavailable due to an error or the response time is too long, the service will be degraded, and then the call to the microservice of the node will be broken, and the wrong response information will be returned quickly. When it is detected that the microservice call response of the node is normal, the call link is resumed.

Service avalanche effect:

There are usually multiple services in a microservice architecture system. If a basic service failure occurs during a service call, it may cause a cascading failure, that is, if one service is unavailable, it may cause all services that call it or indirectly call it to be unavailable. , resulting in the unavailability of the entire system, this phenomenon is also known as the service avalanche effect

The reasons for the service avalanche effect are as follows:

Hardware failure: such as server downtime, computer room power outage, fiber optic being cut, etc.

Traffic surge: such as abnormal traffic, retry to increase traffic, etc.

Cache penetration: generally occurs when the application restarts, when all caches fail, and when a large number of caches fail in a short period of time, due to a large number of cache misses, the request directly hits the backend service, causing the enlisted provider to overload and cause the service to be unavailable .

Program bugs: such as program logic leading to infinite loops or memory leaks.

Synchronous waiting: Synchronous call mode is adopted between services, and synchronous waiting causes resource exhaustion

Guess you like

Origin blog.csdn.net/weixin_58419099/article/details/131294939