-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Feature] Support setting the universal default rule for all resources #66
Comments
很好的建议,对减少用户规则设置的工作量有很大帮助。 我们不支持规则通配符主要有两个考虑:
全局默认降级规则的想法不错,可以再深入讨论一下,比如把全局规则存储在哪里、跟用户的规则是什么关系等等。 |
目前规则与统计插槽(ClusterBuilderSlot)是强关系……针对这样设计,我认为可以以这种方式实现(改动最小):复制全局规则以初始化某资源规则。经过我初步测试是可行的。以下是我修改DegradeRuleManager.checkDegrade()的代码,供参考: /** 修改支持全局规则 - shenjian **/
|
It's inappropriate to set default rules in sentinel-core, instead, let some kind of sentinel-extension do this work could be considered. |
我在想能不能这个降级规则加入类似于分组的这种概念,不同服务的的降级业务处理一般来说都是不同的,但是不排除存在某部分的业务他们的降级处理业务大同小异,那么它们的降级服务便可以纳入一个奖及服务分组,而这个分组的代码只需要在一处维护,不同的服务可以动态的去选择某个分组作为自己默认的服务降级处理方式,当然也是可以实现自己特有的服务降级逻辑。 也不知道这种想法现不现实、可不可行。 |
我觉得这相当于给每个资源的降级规则的加载和生效增加了层级和优先级关系。 生效规则: 同时在这里我提一些关于全局配置的一些想法: 如何实现: |
@linlinisme The issue title might be confusing... In this thread, we were actually discussing the universal default rule for all resources. That is, when a new resource is created, if there're no rules for this resource, then a default rule will be created and added for the resource. As soon as there are user-defined rules for this resource, the default rule will be deprecated. The "global rule" (aka. for each type it has the only one and it represents all resources) is also useful in some scenarios. We could discuss with it (and the PR #956) in a new issue :) |
emm.... It does not matter. We can tread it like "global default rule", We can still implement in "global manager". I think all the rules should share same "global rule", it is unnecessary to a default rule will be created and added for the resource. As soon as there are user-defined rules for this resource, the default rule will be deprecated. First we can save memory, Second We keep |
In fact, each rule may have its own additional statistic data (i.e. it's not stateless: for |
Thanks for reminding. Flow Rule's |
How about this? Take downgrade as an example, We add default rule when build process chain.
|
|
like |
结合feign 对下游业务做限流,也很有必有有针对某一个服务的限流 |
1,全局规则配置,如果对一个api资源用户自定义配置了规则优先执行这个 |
yeah,we plan use sentinel to replace hystrix, the default hystrix settings can meet our system requirements,but find sentinel cannot set it |
Any progress? |
Any update? |
Any update? |
上古贴 [捂脸] ,惊喜的发现还没有fixed |
…sg when… (alibaba#294) * Fix issue : duplicate compress message body if retry to send msg when exception occurs in async sending.
然后呢,没有后续了? 怎么实现“全局默认降级规则”呢? |
你好,你的邮件我已收到。
|
你好,你的邮件我已收到。
|
你好,你的邮件我已收到。
|
全局限流能够用同种方式实现吗?大佬们 |
你好,你的邮件我已收到。
|
据了解,目前的规则只能针对某个资源进行设置。希望提供支持全局规则设置,或资源名可通配符表达。
应用场景:所有资源默认错误率达到多少自动降级,有特殊需求的资源另外设置。
The text was updated successfully, but these errors were encountered: