alibaba/Sentinel

Support LRU evicting mechanism for origin statistic map in StatisticNode

Open

#860 opened on Jun 24, 2019

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Java (23,109 stars) (8,150 forks)batch import
good first issuekind/feature

Description

Issue Description

Type: feature request

Describe what happened (or what feature you want)

我们的业务场景,希望能能够按照调用方的IP来限流,Sentinel 目前支持按照调用源来限流,但是没有淘汰策略,业务真正使用起来,假如IP数量比较多,风险有点大,所以希望能够支持LRU,业务使用起来更稳定。

其实热点参数限流,目前是支持LRU的,但是为什么不能用热点参数来限流呢? 热点参数限流,一般情况下,需要把限流的源绑定到参数上,这样才可以使用。但是实际的业务场景很复杂,例如上游服务不愿意改动,所以用热点参数限流可能做起来就不是那么的方便。所以才需要能够按照调用源来限流。例如按IP,这样只需要获取到上游服务的IP就行,并且IP过多的情况下,还支持LRU,就比较稳妥了。

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

Contributor guide

Support LRU evicting mechanism for origin statistic map in StatisticNode · alibaba/Sentinel#860 | Good First Issue