Huxing Zhang created DUBBO-38:
---------------------------------
Summary: Built-in support for Circuit Breaker
Key: DUBBO-38
URL: https://issues.apache.org/jira/browse/DUBBO-38
Project: Apache Dubbo
Issue Type: Task
Reporter: Huxing Zhang
Providing mocked data for request is a key way to achieve stability and
resiliency.
Currently, Dubbo supports service mock in the following aspects:
1. No matter what status the service provider, always return the mocked data
2. Calls the actual service provider, if it failed (after retried for several
times), and return the mocked data.
The above two strategies have their deficiencies, which is not intelligent
enough to be able to do it automatically. The expected behavior is according to
the statistics of invocation, decide to return mocked data or not at runtime.
The objective of this idea is to provide a built-in light-weighted support for
circuit breaker. Please refer to [Circuit
Breaker](https://github.com/Netflix/Hystrix/wiki/How-it-Works#CircuitBreaker)
To achieve this, one way is to extend the
[Cluster](https://github.com/apache/incubator-dubbo/blob/master/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java)
interface to implement a customized Cluster, and to extend the
[Filter](https://github.com/apache/incubator-dubbo/blob/master/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Filter.java)
interface to get the invocation statistics.
The difference between the built-in circuit breaker and 3rd party circuit
breaker, e.g. hystrix, and sentinel, should be that the build-in support is
light-weight and simple.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)