Open ro9er opened 5 years ago
This is a good idea giving users more flexible strategy. Any thoughts on its implementation?
Maybe one way to implement that is make one resource contains N clusterNode, which correspond to one time dimension rule. For example, if one resource has 4 rules and the statistic unit is 1s 1s 20s 20min, the resource will have 3 cluster Node. And we perform flow control on that. Another way is that we use just one clusterNode based on 1s like now. And if we want to support more statistic dimension, we log the statistic per second by retrieving the clusternode per second or on requests entering.
Issue Description
feature request
Describe what happened (or what feature you want)
In some situation, we want to perform flow control not only based on the statistics of 1 second. For example, as for some origin/callers, we wanna count the call times in 1 minute and block the caller if the count exceeds the threshold. Sentinel does not support this kind of statistics.
Describe what you expected to happen
Sentinel supports more statistic dimension of unit. It would be perfect if programmers can build the statistic rule by setting count parameters.
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
Anything else we need to know?