Thread isolation, service degradation

Thread isolation, service degradation

1.3.1. Principle

Hystrix allocates a small thread pool for each dependent service call. If the thread pool is full, the call will be rejected immediately. By default, queuing is not used to speed up the failure determination time.

The user's request will no longer directly access the service, but through the idle thread in the thread pool to access the service.
If the thread pool is full or the request times out , it will be downgraded. What is a service downgrade?

Service degradation: Priority is given to ensuring core services, not unavailability or weak availability of core services.

When the user's request fails, it will not be blocked, nor will it wait endlessly or see the system crash,
at least one execution result
(such as returning a friendly prompt message) can be seen .

Although service degradation will cause the request to fail, it will not cause blocking,
and will at most affect the resources in the thread pool corresponding to the dependent service , and will
not respond to other services.

Circumstances that trigger the downgrade of Hystix services:

  • Thread pool is full
  • Request timed out

Guess you like

Origin blog.csdn.net/m0_51684972/article/details/115057820