Skip to content
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

Support LRU evicting mechanism for origin statistic map in StatisticNode #860

Open
yikangfeng opened this issue Jun 24, 2019 · 3 comments · May be fixed by #929
Open

Support LRU evicting mechanism for origin statistic map in StatisticNode #860

yikangfeng opened this issue Jun 24, 2019 · 3 comments · May be fixed by #929
Labels
good first issue Good for newcomers kind/feature Category issues or prs related to feature request.

Comments

@yikangfeng
Copy link

yikangfeng commented Jun 24, 2019

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?

@sentinel-bot
Copy link
Collaborator

Hi @yikangfeng, we detect non-English characters in the issue. This comment is an auto translation from @sentinel-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.

According to the caller to limit the flow, I hope to support the LRU, which can flexibly support the current limit by various sources, without worrying about memory problems.

Issue Description

Type: feature request

Describe what happened (or what feature you want)

In our business scenario, we hope to be able to limit traffic according to the IP of the caller. Sentinel currently supports traffic limiting according to the calling source, but there is no elimination strategy. The service is actually used. If the number of IPs is large, the risk is a bit large, so I hope to be able to Support LRU, the business is more stable to use.

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?

@sentinel-bot sentinel-bot changed the title 按调用方来限流,希望能够支持LRU,这样可以灵活支持按各种来源来限流,不用担心内存问题 According to the caller to limit the flow, I hope to support the LRU, which can flexibly support the current limit by various sources, without worrying about memory problems. Jun 24, 2019
@sentinel-bot sentinel-bot added the kind/question Category issues related to questions or problems label Jun 24, 2019
@sczyh30 sczyh30 changed the title According to the caller to limit the flow, I hope to support the LRU, which can flexibly support the current limit by various sources, without worrying about memory problems. Support LRU evicting mechanism for origin statistic map in StatisticNode Jun 26, 2019
@sczyh30 sczyh30 added kind/enhancement Category issues or prs related to enhancement. and removed kind/question Category issues related to questions or problems labels Jun 26, 2019
@sczyh30
Copy link
Member

sczyh30 commented Jun 26, 2019

This could bring extra dependencies (e.g. ConcurrentLinkedHashMap), but it's might be necessary for some circumstances.

What do you think of it? @CarpenterLee @jasonjoo2010 @cdfive

@sczyh30 sczyh30 added the good first issue Good for newcomers label Jul 16, 2019
@sczyh30 sczyh30 added kind/feature Category issues or prs related to feature request. and removed kind/enhancement Category issues or prs related to enhancement. labels Aug 3, 2019
@ctrl2
Copy link

ctrl2 commented Dec 13, 2019

这个功能什么时候能够合并到主版本?非常有用!

CST11021 pushed a commit to CST11021/Sentinel that referenced this issue Nov 3, 2021
CST11021 pushed a commit to CST11021/Sentinel that referenced this issue Nov 3, 2021
* Remove the useless files

* Replace PermSize with MetaspaceSize, details see http://openjdk.java.net/jeps/122

* Update DLedgerCommitLog.java (alibaba#1145)

Delete useless code

* Remove the duplicate content

* Polish the comment (alibaba#1107)

* Minor Typo fix  (alibaba#860)

* [ISSUE alibaba#1082] Fix disconnection of HA (alibaba#1083)

* fixed the text description in chinese doc (alibaba#1339)

* fix /dev/shm not found on some OSs (alibaba#1345)

* Refactor the protection logic when pulling

* change the MQVersion variable to rocketmq 4.5.2 version;

* Minor polish

* Fix the wrong package name

* [maven-release-plugin] prepare release rocketmq-all-4.5.2

* [maven-release-plugin] prepare for next development iteration

* [RIP-15]Add Ipv6 support for RocketMQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants