google / guava

Google core libraries for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Burst Suppression Using Guava RateLimiter

adamcyber1 opened this issue · comments

commented

Hello - is there any ability to limit the "rate of change" rather than setting an absolute TPS limit using the RateLimiter.

I am looking to do some type of "burst suppression" - effectively limiting the rate of change of some input TPS, similar to this MATLAB component: https://www.mathworks.com/help/simulink/slref/ratelimiter.html

RateLimiter doesn't have such a feature. Can you describe the use case that you think people will have in some more detail?

commented

Actually at my work in the distributed systems world we frequently have asynchronous tasks that are bursty in nature (and can therefore be delayed without negative impact by rate limiting)- but given the fact that our systems continuously grow in throughput, and we already have a bunch of various throttling configs and other types of "rate limits" all over the place, we are often tentative to implement new TPS limiters because of the additional operational overhead.

We frequently have to make unpleasant design tradeoffs like setting the fixed rate limits quite high to prevent having to frequently adjust them.

Recent analysis has shown that many of our problems stem from microbursting behaviour - while average utilization remains low. So ideally a "burst suppressor" TPS limiter that scales its allowable peak burst TPS as the system scales, but always limits the deviation from mean.

I will likely implement this myself since it seems there is no current implementation. Essentially it can just be an input aggregator that computes the recent rate and adjusts the rate limiter accordingly - very simple. Will build this on top of guava RateLimiter

Hello sir ,
I am new to open source contribution.
I already know java , my tech stacks & tools includes C, C++ , Python , Java, JavaScript , HTML , CSS , SQL , Bootstrap, ReactJS, ExpressJS, NodeJS & Git . I need a little help from your side to contribute to these amazing projects.