dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Proposal]Embedded Short-Circuit support

Open chickenlj opened this issue 6 years ago • 2 comments

Hello, community

I am writing to introduce a proposal of supporting short-circuit in Dubbo. This is a feature that the community desperately needs.

Some discussions about this feature recently:

https://github.com/apache/incubator-dubbo/pull/1574 https://github.com/apache/incubator-dubbo/issues/1505 https://lists.apache.org/thread.html/59b8feb5b6c379e9aa081c1a2a39171f10108d4a79901320de2310d8@%3Cdev.dubbo.apache.org%3E

Hystrix

Hystrix provides a quite easy way for developers by wrapping Dubbo RPC calls, and it can be more flexible by using directly, so I think there's no need of integrating ystrix with Dubbo internally. Besides, the Dubbo team has provided a demo of using Hystrix with Dubbo.

Embedded Short-Circuit support

Dubbo has a fallback mechanism, known as mock, but it's not intelligent enough, it will always start a remote call and default to fallback only when this call fails. To make it more intelligent, we can add a decision maker, called Circuit Breaker, based on the statistics collected. The state of the Circuit Breaker changes continuously, so it can be used to decide whether to make an actual remote call or return directly with the fallback value when a request comes.

@ralf0131 has submitted a PR #1966 introducing a totally new Metrics module, I think this module can be used as the basis of the upcoming Circuit Breaker.

Below is the extensions I think we should add:

  • One new LoadBalance policy that can distribute traffic according to downstream node healthy status.
  • One new Cluster policy works as an intelligent mock based on the Circuit Breaker.

chickenlj avatar Jul 06 '18 07:07 chickenlj

#1923

chickenlj avatar Jul 06 '18 07:07 chickenlj

I want to try, please assign to me

aamingaa avatar Jan 06 '23 07:01 aamingaa