-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
SystemRule inbound QPS mode does not work well | 系统保护规则限制qps失败,通过successQps判断存在滞后性 #2450
Comments
具体表现是?可否发一下当时的 metric log 看看,是否有达到阈值。 |
参数配置如下,使用100个线程调用测试方法。 List rules = new ArrayList(); 按照定义,此时应该能限制住qps为30,实际结果通过qps约等于130 1637386848000|2021-11-20 13:40:48|methodA|118|1200|118|0|50|0|0|0 经排查发现SystemSlot是根据Constants.ENTRY_NODE.successQps()参数来判断qps是否超过阈值。而Constants.ENTRY_NODE.successQps()的赋值是在entry.exit()中实现的。所以会发生有业务处理延时时,限制不生效。观察普通的限流使用的是node.passQps()参数。修改成该参数后限流会变成30-40,会有轻微超过阈值。 |
参考pr修复 #2455 发现可以解决该问题。 |
Sentinel/sentinel-demo/sentinel-demo-basic/src/main/java/com/alibaba/csp/sentinel/demo/system/SystemGuardDemo.java
Line 61 in 0a34fc4
增加模拟业务处理时间后会导致系统保护规则失败。该demo也无法限制住qps。
The text was updated successfully, but these errors were encountered: