Open fattyhan opened 3 years ago
网关规则参数: { "burst": 0, "controlBehavior": 2, "count": 1.0, "grade": 1, "intervalSec": 1, "maxQueueingTimeoutMs": 600, "paramItem": { "fieldName": "clientId", "matchStrategy": 0, "parseStrategy": 2, "pattern": "test" }, "resource": "/list", "resourceMode": 0 }
sentinel配置 spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 cloud: sentinel: enabled: true filter: enabled: true transport: port: 8719 dashboard: localhost:8080 datasource: ds: nacos:
server-addr: localhost:8848 ## nacos连接的分组 group-id: DEFAULT_GROUP ###路由存储规则 rule-type: flow ### 读取配置文件的 data-id data-id: member-sentinal ### 读取培训文件类型为json data-type: json
1、请求网关接口/list,分别带header参数clientId和不带都不触发限流规则 2、尝试将resource配置为routeId,依然不起作用 3、官方单元测试以及wiki对该部分描述未详尽,demo起不到引导作用
1、期望能按照规则执行限流
local
Refer https://github.com/alibaba/spring-cloud-alibaba/wiki/Sentinel
注意:网关流控规则数据源类型是 gw-flow,若将网关流控规则数据源指定为 flow 则不生效。
Issue Description
网关规则参数: { "burst": 0, "controlBehavior": 2, "count": 1.0, "grade": 1, "intervalSec": 1, "maxQueueingTimeoutMs": 600, "paramItem": { "fieldName": "clientId", "matchStrategy": 0, "parseStrategy": 2, "pattern": "test" }, "resource": "/list", "resourceMode": 0 }
sentinel配置 spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 cloud: sentinel: enabled: true filter: enabled: true transport: port: 8719 dashboard: localhost:8080 datasource: ds: nacos:
nacos连接地址
Describe what happened (or what feature you want)
1、请求网关接口/list,分别带header参数clientId和不带都不触发限流规则 2、尝试将resource配置为routeId,依然不起作用 3、官方单元测试以及wiki对该部分描述未详尽,demo起不到引导作用
Describe what you expected to happen
1、期望能按照规则执行限流
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
local
Anything else we need to know?