Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否支持通用资源的熔断规则配置 #1391

Closed
onethin opened this issue Apr 9, 2020 · 4 comments
Closed

是否支持通用资源的熔断规则配置 #1391

onethin opened this issue Apr 9, 2020 · 4 comments
Labels
area/circuit-breaking Issues or PRs related to circuit breaking duplicate This issue or pull request already exists kind/question Category issues related to questions or problems

Comments

@onethin
Copy link

onethin commented Apr 9, 2020

目的是用在网关上,目前我们使用了apollo的动态规则配置,配置格式上是每一个资源有他的规则。现在想要是否可以支持通用的熔断规则配置,即配置一个全局的规则,比如连续5笔时间超过20秒就熔断,对于任何一个通过的资源都生效,另外也可以针对某个特定的资源具体配置,像现在一样。因为通过网关的资源会动态增加,每一个资源单独配置人力维护成本太高,希望有一个兜底的通用规则,可以配置的大一些,某些特殊的单独配置。另外看下了一下ApolloDatasource的源码,似乎是规则有变化就会把原来的规则清理掉,再重新加载一遍,本来想自己实现一个逻辑在应用启动的时候初始化所有资源为一个通用规则,但是因为ApolloDatasource的刷新方式,这样实现也不可行了。

@sczyh30
Copy link
Member

sczyh30 commented Apr 9, 2020

Related to #66

@sczyh30 sczyh30 added kind/question Category issues related to questions or problems duplicate This issue or pull request already exists labels Apr 9, 2020
@sczyh30 sczyh30 added the area/circuit-breaking Issues or PRs related to circuit breaking label Apr 17, 2020
@apple987
Copy link

建议你可以在dashboard里面的ResourceController的fetchResourceChainListOfMachine方法找到灵感,这个方法有List nodeVos = httpFetcher.fetchResourceOfMachine(ip, port, type);
这里可以拿到所有的资源节点,如果你需要所有资源加一个特定通用规则,拿到资源以后,可以自己做个循环调用规则处理接口,就可以完成了吧

@apple987
Copy link

建议改造dashboard,也可以页面做这种处理,添加一个选择生效的资源节点,选中配置规则,一键生效

@sczyh30
Copy link
Member

sczyh30 commented Nov 8, 2022

resolved via #2232 and bb28104

@sczyh30 sczyh30 closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/circuit-breaking Issues or PRs related to circuit breaking duplicate This issue or pull request already exists kind/question Category issues related to questions or problems
Projects
None yet
Development

No branches or pull requests

3 participants