chenhanlin

Results 9 comments of chenhanlin

> whats mean? > > > and then delete it? step 1:add a rule. ![image](https://user-images.githubusercontent.com/81564338/190096956-e0477683-f380-400d-8135-78fd45a32dbe.png) step2:delete the rule we just added ![image](https://user-images.githubusercontent.com/81564338/190097316-ad255c44-c191-492d-a479-1e4a599b63a3.png) step3:ask server ![image](https://user-images.githubusercontent.com/81564338/190097408-18eb319a-115f-4e6b-bfec-a20b696fa9bb.png)

I will submit another issue for another problem,this issue will be closed.

有这个需求: 比如现在有一个接口: /api/queryResource 针对调用方A系统,这个接口要限流QPS为100 针对B系统,这个接口要限流QPS500.。。 这种场景,目前的注解@SentinelResource怎么实现呢

希望官方能提供此功能。紧急需要。

> 可以为不同的调用方分配不同的channel,在参数中进行透传,然后按照channel进行限流 参考[基于调用关系的流量控制](https://sentinelguard.io/zh-cn/docs/flow-control.html#%E5%9F%BA%E4%BA%8E%E8%B0%83%E7%94%A8%E5%85%B3%E7%B3%BB%E7%9A%84%E6%B5%81%E9%87%8F%E6%8E%A7%E5%88%B6) 我设定了origin,但是发现了一个问题: 假设我接口资源名为 testApi 现在配置3条规则: testApi default qps1 testApi user1 qps10 testapi user2 qps20 现在传参 origin=user1,发现受到了default的限流。 可是:官方的解释明明是:同一个资源名可以配置多条规则,规则的生效顺序为:{some_origin_name} > other > default ------------------------------------------------------------- 如果不配置default的话,user1和user2是分别生效的,只要加上default就会失效其他规则。 ![image](https://user-images.githubusercontent.com/81564338/177960432-74be2077-a4df-45a0-9a62-980374fdaac2.png) 求解

补充请求源码和业务日志: 源码: req, err := http.NewRequest("POST", prometheusAlertUrl, bytes.NewBuffer(jsonStr)) if err != nil { log.Error(err.Error()) return "error", err } else { // req.Header.Set("X-Custom-Header", "myvalue") req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err...