alibaba / alibaba/Sentinel

集群流控时热点参数的durationInSec不生效 | ParamFlowRule durationInSec does not work for cluster mode

Open
#2,245 2 comments 0 reactions 0 assignees View on GitHub
area/cluster-flow area/hotspot-param-flow kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

在非集群模式时,可以使用`ParamFlowRule.setDurationInSec`的方式控制统计窗口的时长,以实现例如10000次/小时,50次/分的这种QPH、QPM的需求。
但是在集群模式时,看源码发现durationInSec这个字段在`ClusterParamFlowChecker.acquireClusterToken`中并没有用到,校验时间的方式和单机模式也有所不同,所以在集群模式时只能通过QPS的方式去控制流量吗?还是有其他的方法

Contributor guide

Open the contributing guide

Research direction

Read ParamFlowRule.setDurationInSec and ClusterParamFlowChecker.acquireClusterToken, then compare how duration-based timing is handled in cluster and non-cluster modes. Confirm the intended cluster behavior and add focused coverage for it; done means durationInSec affects cluster-mode validation or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.