chenhanlin
chenhanlin
> whats mean? > > > and then delete it? step 1:add a rule.  step2:delete the rule we just added  step3:ask server 
I will submit another issue for another problem,this issue will be closed.
see this issue pls,thk. #3945
有这个需求: 比如现在有一个接口: /api/queryResource 针对调用方A系统,这个接口要限流QPS为100 针对B系统,这个接口要限流QPS500.。。 这种场景,目前的注解@SentinelResource怎么实现呢
希望官方能提供此功能。紧急需要。
@[sczyh30](https://github.com/sczyh30)
> 可以为不同的调用方分配不同的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就会失效其他规则。  求解
补充请求源码和业务日志: 源码: 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...