netflix-hystrix-Introduction [Translate]

Source: Internet
Author: User

What is Hystrix?
In a distributed environment, some unavoidable services fail, and hystrix can control the interaction between distributed services by delaying tolerance and error tolerance logic. Hystrix can isolate service access ingress, suppress cascading errors,
Support fallback, all of which can improve the overall elasticity of the system (resiliency).

What Hystrix to do

Protection and control of delays and errors in access services;
Suppress cascading errors in complex distributed systems;
Rapid failure and rapid recovery;
fallback and downgrade;
Near real-time monitoring, alerting and operation control.

What problems can hystrix solve

In a complex distributed system, there are often many service dependencies, and inevitably service failures. Assuming an application relies on 30 services, each service is normal at 99.99% uptime and can be calculated as:
99.99e30 = 99.7% Uptime
0.3% of 1 billion requests = 3,000,000 failures
Hours Downtime/month Even if all dependencies has excellent uptime (99.99%).

When all services are healthy, the request flow is this:

A back-end system produces a delay that affects the user's entire request:

Depending on the service Lib is a "black box", most of it will make network requests, but even worse, the service system may also rely on other services. In high-throughput applications, a service-dependent delay can deplete the entire server resource in seconds:

Hystrix How to solve the problem

Hystrix can wrap service calls in Hystrixcommand, each Hystrixcommand maintains a threadpool to isolate the service, and when a service produces a delay, its "engulfing" Resources are only limited to the Hystrixcommand (for example, at most only n thread resources), without affecting the global. Dependent Threadpool,hystrix can also implement a timeout operation. At the same time, when the request time-out, exception, line Cheng, fuse open, Hystirx can fallback.

netflix-hystrix-Introduction [Translate]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.