开发者社区 > 云原生 > 正文

[Bug] Dashboard 流控规则——编辑单机阈值保存后,再次访问被流控的接口,单机阈值恢复成

流控规则页面,例如原先阈值=20,编辑单机阈值修改成100保存成功后,页面显示100,当请求触发限流约束的接口后,阈值从100变回20,单机阈值规则没有在客户端生效

提问279.png

1、先调用"http://localhost:8719/getRules?type=flow" 查询到"count":20.0,也就是预设值

2、页面上编辑count=120,推送到本地内存,再次查询发现count=120

3、URL触发正常接口

4、再次查询"http://localhost:8719/getRules?type=flow",发现count=20

本地sentinel-record.log.2018-12-27 2018-12-27 10:20:46 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@30ef9122}]} 2018-12-27 10:21:14 Receiving rule change (type: flow): [{"clusterMode":false,"controlBehavior":0,"count":120.0,"grade":1,"limitApp":"default","maxQueueingTimeMs":500,"resource":"HelloWorld","strategy":0,"warmUpPeriodSec":10}] 2018-12-27 10:21:14 [DynamicSentinelProperty] Config will be updated to: [FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=120.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=null}] 2018-12-27 10:21:14 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=120.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@1b3dee38}]} 2018-12-27 10:21:35 [DynamicSentinelProperty] Config will be updated to: [FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=null}] 2018-12-27 10:21:35 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@217efcc5}]}

原提问者GitHub用户bobo612

展开
收起
码字王 2023-05-19 19:30:50 85 0
1 条回答
写回答
取消 提交回答
  • 请检查应用端 /user/test API 内的逻辑,看看是否有修改过规则。

    原回答者GitHub用户sczyh30

    2023-05-19 22:46:01
    赞同 展开评论 打赏
问答地址:

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载